Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
If you must write a shell script in Ansible, you most likely have one thing like this:
- title: iterate person teams
shell: groupmod -o -g {{ merchandise['guid'] }} {{ merchandise['username'] }}
with_items: "{{ customers }}"
However how do you write multiline shell scripts with this format?
- title: iterate person teams
shell: |
groupmod -o -g {{ merchandise['guid'] }} {{ merchandise['username'] }}
do_some_stuff_here
and_some_other_stuff
with_items: "{{ customers }}"
Simply notice that Ansible can do some unusual issues with manipulations of arguments, so you could need to observe one thing like this:
- shell: |
cat <<EOF
It is a check.
EOF
Or higher but, wrap them:
- shell:
cmd: |
cat <<EOF
It is a check.
EOF