YAML formating for actions with many arguments
Some modules require more options than can comfortably fit on a single line in a playbook. In YAML you can use '>' to start a multi-line string that collapses intervening whitespace. For Example:
tasks:
- name: "Write postgresql.conf file"
action: >
template
src=files/postgresql.conf.j2
dest=/var/lib/pgsql/data/postgresql.conf
owner=postgres
group=postgres
mode=0600
notify: reload postgresql
Written by Kal Hodgson
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ansible
Authors
Misha Behersky
78.83K
tartansandal
73.25K
Related Tags
#ansible
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#