mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-07-04 01:28:53 +00:00
Parameterized include statements can see top level variables and also be passed specific variables!
Code needs cleanup, but works
This commit is contained in:
parent
fb3bfa1c51
commit
4ee4ddcd7c
3 changed files with 18 additions and 3 deletions
|
|
@ -3,3 +3,5 @@
|
|||
action: command /usr/sbin/setenforce 0
|
||||
- name: no iptables
|
||||
action: service name=iptables state=stopped
|
||||
- name: this is just to show variables work here, favcolor={{ favcolor }}
|
||||
action: command /bin/true
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
http_port: 80
|
||||
max_clients: 200
|
||||
tasks:
|
||||
- include: base.yml
|
||||
- include: base.yml favcolor=blue
|
||||
- name: write the apache config file using vars set above
|
||||
action: template src=/srv/httpd.j2 dest=/etc/httpd.conf
|
||||
notify:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue