mirror of
https://github.com/geerlingguy/ansible-role-apache
synced 2025-01-09 03:10:19 +01:00
Added support for enabling/disabled config snippets on Debian/Ubuntu.
This commit is contained in:
parent
2ad0164cfe
commit
58fe5c23d4
3 changed files with 26 additions and 1 deletions
|
@ -88,7 +88,12 @@ The default values for the `AllowOverride` and `Options` directives for the `doc
|
||||||
- ssl.load
|
- ssl.load
|
||||||
apache_mods_disabled: []
|
apache_mods_disabled: []
|
||||||
|
|
||||||
(Debian/Ubuntu ONLY) Which Apache mods to enable or disable (these will be symlinked into the appropriate location). See the `mods-available` directory inside the apache configuration directory (`/etc/apache2/mods-available` by default) for all the available mods.
|
apache_conf_enabled:
|
||||||
|
- other-vhosts-access-log.conf
|
||||||
|
- charset.conf
|
||||||
|
apache_conf_disabled: []
|
||||||
|
|
||||||
|
(Debian/Ubuntu ONLY) Which Apache modules and configuration snippets to enable or disable (these will be symlinked into the appropriate location). See the `mods-available` and `conf-available` directories inside the Apache configuration directory (`/etc/apache2/mods-available` and `/etc/apache2/conf-available` by default) for all the available modules and configuration snippets.
|
||||||
|
|
||||||
apache_packages:
|
apache_packages:
|
||||||
- [platform-specific]
|
- [platform-specific]
|
||||||
|
|
|
@ -46,6 +46,11 @@ apache_mods_enabled:
|
||||||
- ssl.load
|
- ssl.load
|
||||||
apache_mods_disabled: []
|
apache_mods_disabled: []
|
||||||
|
|
||||||
|
apache_conf_enabled:
|
||||||
|
- other-vhosts-access-log.conf
|
||||||
|
- charset.conf
|
||||||
|
apache_conf_disabled: []
|
||||||
|
|
||||||
# Set initial apache state. Recommended values: `started` or `stopped`
|
# Set initial apache state. Recommended values: `started` or `stopped`
|
||||||
apache_state: started
|
apache_state: started
|
||||||
|
|
||||||
|
|
|
@ -23,6 +23,21 @@
|
||||||
with_items: "{{ apache_mods_disabled }}"
|
with_items: "{{ apache_mods_disabled }}"
|
||||||
notify: restart apache
|
notify: restart apache
|
||||||
|
|
||||||
|
- name: Enable Apache configuration snippet.
|
||||||
|
file:
|
||||||
|
src: "{{ apache_server_root }}/conf-available/{{ item }}"
|
||||||
|
dest: "{{ apache_server_root }}/conf-enabled/{{ item }}"
|
||||||
|
state: link
|
||||||
|
with_items: "{{ apache_conf_enabled }}"
|
||||||
|
notify: restart apache
|
||||||
|
|
||||||
|
- name: Disable Apache configuration snippet.
|
||||||
|
file:
|
||||||
|
path: "{{ apache_server_root }}/conf-enabled/{{ item }}"
|
||||||
|
state: absent
|
||||||
|
with_items: "{{ apache_conf_disabled }}"
|
||||||
|
notify: restart apache
|
||||||
|
|
||||||
- name: Check whether certificates defined in vhosts exist.
|
- name: Check whether certificates defined in vhosts exist.
|
||||||
stat: "path={{ item.certificate_file }}"
|
stat: "path={{ item.certificate_file }}"
|
||||||
register: apache_ssl_certificates
|
register: apache_ssl_certificates
|
||||||
|
|
Loading…
Reference in a new issue