I`m trying to run your example, but I have a message of error again. Now 
this is another position. I thougth there could be a problem with spaces, 
but changes doesn`t work too.


ERROR: Syntax Error while loading YAML script, test1.yml
Note: The error may actually appear before this position: line 10, column 1
    apt:update_cache=yes upgrade=full cache_valid_time=3600
^

On Tuesday, October 6, 2015 at 2:37:29 PM UTC+3, pixel fairy wrote:
>
> theres an intro to yaml syntax here. 
> http://docs.ansible.com/ansible/YAMLSyntax.html
>
> be carefull cutting and pasting from groups because things can get 
> reformatted. heres an example with the code highlighting. i hope it comes 
> out ok. also, you can put multiple variables in a single module call like 
> this.
>
> ---
> - hosts: group1
>   user: user1
>   sudo: yes
>   gather_facts: yes
>
>   tasks:
>   - name: ensure update
>     apt: update_cache=yes upgrade=full cache_valid_time=3600
>
>
>
>
>
> On Monday, October 5, 2015 at 5:05:31 AM UTC-7, ansible_novice wrote:
>>
>> I`m trying to launch one playbook:
>>
>>  ---
>>  - hosts:group1
>>    user:user1
>>    sudo:yes
>>    gather_facts:yes
>>
>>  tasks:
>>  - name: ensure update
>>    apt:update_cache=yes
>>    apt:upgrade=full
>>
>> I`m running this by command sudo ansible-playbook -i /etc/ansible/hosts 
>> test1.yml and Ansible said that my playbook has syntax error.
>>
>> ERROR: Syntax Error while loading YAML script, test1.yml
>> Note: The error may actually appear before this position: line 7, column 7
>>
>>
>>  tasks:
>>         ^
>>
>> Maybe someone had similar problem, who knows, what is the reason of 
>> error, give me an answer, please.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/9f239f94-bcc2-4f06-8923-0200e43177e4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to