Example:
If doing a line break, do this:
action: >
module: user
…
Excerpts from howachen's message of 2013-08-22 07:33:46 -0400:
- name: add user
action:
module: user
name={{ user_name }}
uid={{ user_id }}
In addition to what Michael noted, the above is not valid YAML. You can
do either:
- name: add user
action:
module: user
name: "{{ user_name }}"
uid: "{{ user_id }}"
or:
- name: add user
action: >
user
name={{ user_name }}
uid={{ user_id }}
In the former, 'action' is being interpreted as a hash table by the YAML
parser, while in the former, 'action' contains a string with 'key=value'
style arguments which are parsed by Ansible's user module. Both are
valid in Ansible, but you can't mix them, as everything still needs to
be valid YAML.