group_vars /所有语法错误

时间:2015-11-26 10:01:55

标签: json syntax-error ansible

我有一个group_var / all文件,其起始行看起来完全像这样:

##################################
['./roles/openssh/defaults',
 './roles/rsyslog/defaults',
 './roles/tomcat8/defaults',
 './roles/oracle_java/defaults',
 './roles/psp_db/defaults',
 './roles/provision_kill_instance/defaults',
 './roles/kill_app/defaults',
 './roles/base/defaults',
 './roles/ntp/defaults']
##################################

base_google_dns_enabled: false

当我将其作为 ansible-playbook provision_aws.yml 运行时,它会抛出错误:

ERROR: Syntax Error while loading YAML script, /home/nsingh/ansible-psportal/group_vars/all
Note: The error may actually appear before this position: line 13, column 1


base_google_dns_enabled: false

根据我的诊断,这是因为[]中的内容,即使我把它放在我的group_vars的末尾,我遇到类似的东西。任何帮助都将受到高度赞赏。

1 个答案:

答案 0 :(得分:0)

您的语法看起来不正确。尝试:

 <body>
    <div class="wrapperOrg">
      <div class="alignedLeft col-md-19 col-sm-20 col-xs-24">
        <nav id="topNavigation" class="navbar navbar-default" role="navigation">
          <div class="container-fluid">
            <div class="navbar-header">
              <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-collapse-1">  
                <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
              </button>
            </div>
            <div class="collapse navbar-collapse" id="navbar-collapse-1">      
              <ul class="nav navbar-nav">
                <li>
                  <a href=""><span>Manufracturer<span> </span>Approved</span></a>
                </li>
                <li>    
                  <a href=""><span>Customer 1st<span> </span>We'll visit you</span></a>
                </li>
                <li>    
                  <a href=""><span>Excess<span> </span>SAFE</span></a>
                </li>
                <li>
                  <a href=""><span>Friendly Form- <span> </span>Free Help</span></a>
                </li>
                <li>    
                  <a href=""><span>FREE-<span> </span>Accident Management</span></a>
                </li>
              </ul>
            </div>     
          </div>
        </nav>
      </div><div id="socialNavigation" class="alignedRight col-md-5 col-sm-4 col-xs-18">
        <ul class="nav navbar-nav">          
          <li>
            <a href="#facebook">
              <i class="icon icon-facebook"></i>
            </a>
          </li>
          <li>  
            <a href="#googleplus">
              <i class="icon icon-twitter"></i>
            </a>
          </li>
          <li>
            <a href="#twitter">
              <i class="icon icon-youtube"></i>
            </a>
          </li>
        </ul>
      </div>
    </div>
    <div class="wrapperWh">
      <div class="alignedLeft static-top col-md-19 col-sm-20 col-xs-24">
        <nav id="mainNavigation" class="navbar navbar-default" navbar-static-top>
          <div class="container-fluid">
              <div class="alignedLeft col-md-7 col-sm-7 col-xs-7">
            <div class="navbar-header">
              <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-collapse-2">
                <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
              </button>
              <div class="navbar-brand ">
                <img src="images/advance_logo.png" alt=""/>
              </div>  
            </div>
                </div><div class="alignedRight col-md-17 col-sm-17col-xs-17">
            <div class="collapse navbar-collapse" id="navbar-collapse-2">      
              <ul class="nav navbar-nav">
                <li>
                  <a href="">Home</a>
                </li>
                <li> 
                  <a href="">Accident<br>Management</a>
                  <div class="subMainNavigation">
                    <div class="col-md-5 col-sm-5 col-sx-5">
                      <img src="images/kitemark.png" alt=""/>
                      <p>There are many variations of passages. There are many variations of passages of Lorem Ipsum available</p>
                    </div>
                    <div class="col-md-9 col-sm-9 col-sx-9">
                      <ul>
                          <li><a href="">Download App</a></li>
                          <li><a href="">Accident Helpline</a></li>
                      </ul>
                    </div>
                    <div class="col-md-10 col-sm-10 col-sx-10"></div>
                  </div>
                </li>
                <li>    
                  <a href="">Approved<br>Manufacturers</a>
                </li>
                <li>
                  <a href="">Our<br>Services</a>
                  <div class="subMainNavigation">
                    <div class="col-md-5 col-sm-5 col-sx-5">
                        <img src="images/kitemark.png" alt=""/>
                        <p>There are many variations of passages. There are many variations of passages of Lorem Ipsum available</p>
                    </div>
                    <div class="col-md-9 col-sm-9 col-sx-9">
                      <ul>
                          <li><a href="">Structural Aluminium Repairs</a></li>
                        <li><a href="">Free Manufacturer paint/body inspection</a></li>
                      </ul>
                    </div>
                    <div class="col-md-10 col-sm-10 col-sx-10"></div> 
                  </div>
                </li>
                <li>    
                  <a href="">About<br>Advance</a>
                  <div class="subMainNavigation">
                    <div class="col-md-5 col-sm-5 col-sx-5">
                        <img src="images/kitemark.png" alt=""/>
                        <p>There are many variations of passages. There are many variations of passages of Lorem Ipsum available</p>
                    </div>
                    <div class="col-md-9 col-sm-9 col-sx-9">
                      <ul>
                        <li><a href="">Commitment to Quality</a></li>
                        <li><a href="">Pride and Joy</a></li>
                        <li><a href="">Meet the team</a></li>
                      </ul>    
                    </div>
                    <div class="col-md-10 col-sm-10 col-sx-10"></div>
                  </div>
                </li>
                <li>    
                  <a href="">Contact<br>Us</a>
                </li>
              </ul>
            </div> 
            </div> 
          </div>
        </nav>
      </div><div id="callNavigation" class="alignedRight col-md-5 col-sm-4 col-xs-18">
        <a href="phone:">
          <i class="icon icon-phone"></i>
          <p>
            <span>Helpline</span>
            <span>01246 858500</span>
          </p>
        </a>
      </div> 
       <div id="displaySubmenu" class="col-md-24 col-sm-24 col-xs-24"></div>
    </div>
    <div class="wrapperMain">
      <div id="mainContent" class="col-md-24 col-sm-24 col-xs-24">
      <div id="owl-main" class="owl-carousel">
          <div>
            <img src="http://s23.postimg.org/9f5c5mgi3/slider1.jpg" alt=""  class="img-responsive"/>          
          </div>
        </div>
        <div class="floatingText">
              <h3>Advance Accident <span>MANAGEMENT</span></h3>
              <span>'We'll take the stress away'</span>
              <ul>
                 <li></i>Available all day, every day</li>
                 <li>Free replacement vehicle</li>
                 <li>Free Recovery, delivery a Collection, we'll come to you</li>
                 <li>We'll liase with your insurance company</li>
                 <li>Friendly, form-free help</li>
              </ul>
              <a href="#" class="orangeButton downloadApp"><p>DOWNLOAD</p><span>FREE APP</span></a>
          </div>
        </div>
       </div> <!-- ends wrapperMain--> 
  </body>