library/roles/apache: Do not install the mpm worker package if the PPA is enabled

This commit is contained in:
Andrea Dell'Amico 2017-02-02 15:02:56 +01:00
parent 97e71b765a
commit 025b36ed2d
2 changed files with 12 additions and 4 deletions

View File

@ -10,12 +10,14 @@ apache_mpm_mode: worker
apache_packages:
- apache2
- 'apache2-mpm-{{ apache_mpm_mode }}'
- apache2-utils
- libapache2-mod-xsendfile
- unzip
- zip
apache_modules_packages:
- 'apache2-mpm-{{ apache_mpm_mode }}'
# Only one can be present at the same time. It needs to be listed as the last one
apache_worker_modules:
# - { name: 'mpm_itm', state: 'absent' }

View File

@ -4,10 +4,10 @@
with_items: '{{ apache_packages }}'
tags: [ 'apache', 'apache_main_packages' ]
- name: Install the apache additional packages, if any
- name: Install the apache modules packages
apt: pkg={{ item }} state=installed
with_items: '{{ apache_additional_packages_list }}'
when: apache_additional_packages
with_items: '{{ apache_modules_packages }}'
when: not apache_from_ppa
tags: [ 'apache', 'apache_additional_packages' ]
# - name: Load the required worker module
@ -25,6 +25,12 @@
# ignore_errors: True
# tags: [ 'apache', 'apache_modules' ]
- name: Install the apache additional packages, if any
apt: pkg={{ item }} state=installed
with_items: '{{ apache_additional_packages_list }}'
when: apache_additional_packages
tags: [ 'apache', 'apache_additional_packages' ]
- name: Remove the default virtualhost file
file: dest=/etc/apache2/sites-enabled/{{ item }} state=absent
with_items: