library/roles/apache: Add the possibility to install a newer apache package from an Ubuntu PPA.

This commit is contained in:
Andrea Dell'Amico 2017-02-02 14:52:04 +01:00
parent 21dbb22b48
commit c61e8fe767
3 changed files with 17 additions and 0 deletions

View File

@ -2,6 +2,8 @@
apache_service_enabled: True
apache_user: www-data
apache_group: '{{ apache_user }}'
apache_from_ppa: False
apache_ppa_repo: 'ppa:ondrej/apache2'
# Possible choices: event, prefork (the old ones), worker (the threaded version), itm
apache_mpm_mode: worker

View File

@ -0,0 +1,14 @@
---
- block:
- name: Install the Ubuntu apache PPA
apt_repository: repo='{{ apache_ppa_repo }}' update_cache=yes
when: apache_from_ppa
tags: [ 'apache', 'apache_ppa' ]
- block:
- name: Remove the Ubuntu apache PPA
apt_repository: repo='{{ apache_ppa_repo }}' update_cache=yes state=absent
when: not apache_from_ppa
tags: [ 'apache', 'apache_ppa' ]

View File

@ -1,4 +1,5 @@
---
- include: apache-ppa.yml
- include: apache.yml
- include: apache-modules.yml
- include: apache-basic-auth.yml