Enable Apache modules

This commit is contained in:
Alex Kotov 2020-01-21 17:10:58 +05:00
parent 1da5051b2c
commit 5aeadf22c7
Signed by: kotovalexarian
GPG Key ID: 553C0EBBEB5D5F08
2 changed files with 9 additions and 0 deletions

View File

@ -11,4 +11,5 @@ common__nginx__upstreams: []
common__nginx__sites: []
common__apache__remove_default: true
common__apache__modules: ['php7.3', 'rewrite', 'ssl']
common__apache__sites: []

View File

@ -29,6 +29,14 @@
when: common__apache__remove_default|bool
notify: common | Restart Apache
- name: Enable Apache modules
command: '/usr/sbin/a2enmod "{{ item }}"'
register: common__apache__enable_apache_modules_result
changed_when: >
common__apache__enable_apache_modules_result.stdout is search('Enabling module')
with_items: '{{ common__apache__modules }}'
notify: common | Restart Apache
- name: Add Apache sites
template:
src: 'templates/apache/{{ item.type }}.conf'