Hi,
tasks should have more spaces, it should be aligned to user, sudo, etc.
keywords:
---
- hosts:group1
user:chinkovm
sudo:yes
gather_facts:yes
tasks:
- name: ensure update
apt:update_cache=yes
- name: ensure upgrade
apt:upgrade=full
David Karban
Linux server specialist/Specialista na správu linuxových serverů
www.karban.eu
2015-10-06 9:33 GMT+02:00 ansible_novice <[email protected]>:
> Ok, now I have another code in playbook
>
> ---
> - hosts:group1
> user:chinkovm
> sudo:yes
> gather_facts:yes
>
> tasks:
> - name: ensure update
> apt:update_cache=yes
> - name: ensure upgrade
> apt:upgrade=full
>
> But ansible says about the same error in the same place: in colon of word
> 'tasks'.
>
> On Monday, October 5, 2015 at 3:09:53 PM UTC+3, Brian Coca wrote:
>>
>> it should look like this
>>
>> tasks:
>> - name: ensure update
>> apt:update_cache=yes
>> - apt:upgrade=full
>>
>> You cannot have multiple tasks per task, name is optional but - is not
>> as it indicates when the 'next task' starts
>>
>>
>> --
>> Brian Coca
>>
> --
> 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/ece77445-7464-444e-b6a3-b477fd863f91%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/ece77445-7464-444e-b6a3-b477fd863f91%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>
--
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/CAOBFM956GhDm58ZitCDhbNaBkNJknRhhgKWJLHtJrUM%3DoCCxyQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.