mirror of
https://github.com/geerlingguy/ansible-role-apache
synced 2024-11-09 23:43:30 +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_cipher_suite: "AES256+EECDH:AES256+EDH"
|
||||
|
||||
# Only used on Debian/Ubuntu.
|
||||
# Only used on Debian/Ubuntu/Redhat.
|
||||
apache_mods_enabled:
|
||||
- rewrite.load
|
||||
- ssl.load
|
||||
- rewrite
|
||||
- ssl
|
||||
apache_mods_disabled: []
|
||||
|
||||
# Set initial apache state. Recommended values: `started` or `stopped`
|
||||
|
|
|
@ -11,8 +11,8 @@
|
|||
|
||||
- name: Enable Apache mods.
|
||||
file:
|
||||
src: "{{ apache_server_root }}/mods-available/{{ item }}"
|
||||
dest: "{{ apache_server_root }}/mods-enabled/{{ item }}"
|
||||
src: "{{ apache_server_root }}/mods-available/{{ item }}.load"
|
||||
dest: "{{ apache_server_root }}/mods-enabled/{{ item }}.load"
|
||||
state: link
|
||||
mode: 0644
|
||||
with_items: "{{ apache_mods_enabled }}"
|
||||
|
@ -20,7 +20,7 @@
|
|||
|
||||
- name: Disable Apache mods.
|
||||
file:
|
||||
path: "{{ apache_server_root }}/mods-enabled/{{ item }}"
|
||||
path: "{{ apache_server_root }}/mods-enabled/{{ item }}.load"
|
||||
state: absent
|
||||
with_items: "{{ apache_mods_disabled }}"
|
||||
notify: restart apache
|
||||
|
|
|
@ -14,6 +14,22 @@
|
|||
register: apache_ssl_certificates
|
||||
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.
|
||||
template:
|
||||
src: "{{ apache_vhosts_template }}"
|
||||
|
|
Loading…
Reference in a new issue