mirror of
https://github.com/geerlingguy/ansible-role-apache
synced 2025-01-02 16:20:19 +01:00
Merge pull request #236 from faeyben/redhat_mod
Implement enabling and disabling modules on RedHat systems
This commit is contained in:
commit
a6853edf9b
3 changed files with 22 additions and 6 deletions
|
@ -40,10 +40,10 @@ apache_ignore_missing_ssl_certificate: true
|
||||||
apache_ssl_protocol: "All -SSLv2 -SSLv3"
|
apache_ssl_protocol: "All -SSLv2 -SSLv3"
|
||||||
apache_ssl_cipher_suite: "AES256+EECDH:AES256+EDH"
|
apache_ssl_cipher_suite: "AES256+EECDH:AES256+EDH"
|
||||||
|
|
||||||
# Only used on Debian/Ubuntu.
|
# Only used on Debian/Ubuntu/Redhat.
|
||||||
apache_mods_enabled:
|
apache_mods_enabled:
|
||||||
- rewrite.load
|
- rewrite
|
||||||
- ssl.load
|
- ssl
|
||||||
apache_mods_disabled: []
|
apache_mods_disabled: []
|
||||||
|
|
||||||
# Set initial apache state. Recommended values: `started` or `stopped`
|
# Set initial apache state. Recommended values: `started` or `stopped`
|
||||||
|
|
|
@ -11,8 +11,8 @@
|
||||||
|
|
||||||
- name: Enable Apache mods.
|
- name: Enable Apache mods.
|
||||||
file:
|
file:
|
||||||
src: "{{ apache_server_root }}/mods-available/{{ item }}"
|
src: "{{ apache_server_root }}/mods-available/{{ item }}.load"
|
||||||
dest: "{{ apache_server_root }}/mods-enabled/{{ item }}"
|
dest: "{{ apache_server_root }}/mods-enabled/{{ item }}.load"
|
||||||
state: link
|
state: link
|
||||||
mode: 0644
|
mode: 0644
|
||||||
with_items: "{{ apache_mods_enabled }}"
|
with_items: "{{ apache_mods_enabled }}"
|
||||||
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
- name: Disable Apache mods.
|
- name: Disable Apache mods.
|
||||||
file:
|
file:
|
||||||
path: "{{ apache_server_root }}/mods-enabled/{{ item }}"
|
path: "{{ apache_server_root }}/mods-enabled/{{ item }}.load"
|
||||||
state: absent
|
state: absent
|
||||||
with_items: "{{ apache_mods_disabled }}"
|
with_items: "{{ apache_mods_disabled }}"
|
||||||
notify: restart apache
|
notify: restart apache
|
||||||
|
|
|
@ -14,6 +14,22 @@
|
||||||
register: apache_ssl_certificates
|
register: apache_ssl_certificates
|
||||||
with_items: "{{ apache_vhosts_ssl }}"
|
with_items: "{{ apache_vhosts_ssl }}"
|
||||||
|
|
||||||
|
- name: Enable Apache mods.
|
||||||
|
copy:
|
||||||
|
dest: "{{ apache_server_root }}/conf.modules.d/99-ansible-{{ item }}.conf"
|
||||||
|
content: |
|
||||||
|
LoadModule {{ item }}_module modules/mod_{{ item }}.so
|
||||||
|
mode: 0644
|
||||||
|
with_items: "{{ apache_mods_enabled }}"
|
||||||
|
notify: restart apache
|
||||||
|
|
||||||
|
- name: Disable Apache mods
|
||||||
|
file:
|
||||||
|
path: "{{ apache_server_root }}/conf.modules.d/99-ansible-{{ item }}.conf"
|
||||||
|
state: absent
|
||||||
|
with_items: "{{ apache_mods_disabled }}"
|
||||||
|
notify: restart apache
|
||||||
|
|
||||||
- name: Add apache vhosts configuration.
|
- name: Add apache vhosts configuration.
|
||||||
template:
|
template:
|
||||||
src: "{{ apache_vhosts_template }}"
|
src: "{{ apache_vhosts_template }}"
|
||||||
|
|
Loading…
Reference in a new issue