Making tasks more concise
Actions can be written like this...
tasks:
- name: "Write foo.conf file"
action: template src=templates/foo.conf.j2 dest=/etc/foo.conf
But also shortened up like this:
tasks:
- name: "Write foo.conf file"
template: src=templates/foo.conf.j2 dest=/etc/foo.conf
And if you want, you can leave off the name too, but just using the module name.
tasks:
- template: src=templates/foo.conf.j2 dest=/etc/foo.conf
Be as verbose or non-verbose as you want!
Written by Michael DeHaan
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#