On Monday, 10 December 2018 15:32:53 CET Robert wrote:
> 
>     - name: Force password change for user test-user
>         command: "chage -d 0 {{ item.name }}"
>       with_items: "{{ users }}"
> 
> +++++++++++++++++++++++++++++++
> The first task works fine and creates the users in the user.yml file.
> However, when it gets to the password force change I get the following
> error:
> 
> ERROR! Syntax Error while loading YAML.
>   mapping values are not allowed in this context
> 
> The error appears to have been in
> '/home/rkruck/ansible-playbooks/test.yml': line 19, column 16, but may
> be elsewhere in the file depending on the exact syntax problem.
> 
> The offending line appears to be:
> 
>     - name: Force password change for user test-user
>         command: "chage -d 0 {{ item.name }}"
>                ^ here

You have indented command to far, remove two spaces so it align at the same 
level as name and with_items.

-- 
Kai Stian Olstad


-- 
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/2875697.5IrcR943cM%40x1.
For more options, visit https://groups.google.com/d/optout.

Reply via email to