Created
February 13, 2014 23:32
-
-
Save joshuaconner/8986237 to your computer and use it in GitHub Desktop.
Ansible: possible to pass a dict to a module?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: Ensure nginx is set up | |
tasks: | |
- name: Ensure nginx is installed | |
apt: pkg=nginx | |
- name: Ensure nginx.conf is in place | |
template: "{{ nginx_template_opts }}" | |
notify: restart nginx |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
nginx_template_opts: | |
src: templates/nginx.conf.j2 | |
dest: /etc/nginx/nginx.conf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It's not optimal, but this works: