35 lines
1 KiB
YAML
35 lines
1 KiB
YAML
---
|
|
- name: Sanity checks
|
|
ansible.builtin.assert:
|
|
that:
|
|
- apache2_backend_mod_remoteip_proxy|default("")|ansible.utils.ipaddr != False
|
|
|
|
|
|
- name: 'Enable Apache2 module »remoteip«'
|
|
ansible.builtin.file:
|
|
state: link
|
|
src: ../mods-available/remoteip.load
|
|
dest: /etc/apache2/mods-enabled/remoteip.load
|
|
notify: "Restart Apache2"
|
|
|
|
|
|
- name: 'Template »conf-available/remoteip.conf«'
|
|
ansible.builtin.template:
|
|
src: etc/apache2/conf-available/remoteip.conf.j2
|
|
dest: "/etc/apache2/conf-available/{{ apache2_backend_mod_remoteip_configfile | default('remoteip.conf') }}"
|
|
owner: root
|
|
group: root
|
|
mode: "0644"
|
|
backup: true
|
|
notify: "Restart Apache2"
|
|
|
|
|
|
- name: 'Enable Apache2 config »remoteip«'
|
|
ansible.builtin.file:
|
|
state: link
|
|
src: "../conf-available/{{ apache2_backend_mod_remoteip_configfile | default('remoteip.conf') }}"
|
|
dest: "/etc/apache2/conf-enabled/{{ apache2_backend_mod_remoteip_configfile | default('remoteip.conf') }}"
|
|
notify: "Restart Apache2"
|
|
|
|
|