Render the template system wide, then apply. This way, the appdefinition.yml can contain everything that is required, and we don't have to specify this anymore in the main config
13 lines
452 B
YAML
13 lines
452 B
YAML
- name: Configure firewall options
|
|
ansible.builtin.copy:
|
|
dest: /home/.ppmfirewalltemplate
|
|
group: root
|
|
owner: root
|
|
mode: "0755"
|
|
src: ppmfirewall
|
|
|
|
- name: Render firewall
|
|
ansible.builtin.shell: ppm template /home/.ppmfirewalltemplate /etc/firewall.d/ppmfirewall ; chmod 755 /etc/firewall.d/ppmfirewall
|
|
register: firewall_render
|
|
changed_when: "'content did not change' not in firewall_render.stdout"
|
|
notify: Restart firewall
|