Skip to content
Snippets Groups Projects
Commit 068e77d1 authored by jurgenhaas's avatar jurgenhaas
Browse files

Generalize Apache config

parent b4d21832
No related branches found
No related tags found
No related merge requests found
apache_repositories: []
apache_packages:
- apache2
- apache2-utils
- apache2-mpm-event
- apache2-mpm-worker
- apache2-suexec-custom
- libapache2-mod-fcgid
apache_modules:
- rewrite
- vhost_alias
- ssl
- actions
- alias
- suexec
apache_version: '2.2'
apache_conf_ext: ''
apache_conf_default_prefix: ''
......
---
# file: roles/apache/tasks/apache.yml
- name: "Apache | Apt Repository"
apt_repository:
repo='{{ item }}'
state='present'
with_items: '{{ apache_repositories }}'
- name: "Apache | Install required packages."
apt:
pkg={{ item }}
pkg='{{ item }}'
state=installed
with_items:
- apache2
- apache2-utils
- apache2-mpm-event
- apache2-mpm-worker
- apache2-suexec-custom
- libapache2-mod-fcgid
- python-passlib
with_items: '{{ apache_packages }}'
notify: "Apache | Restart Apache"
- name: "Apache | Enable some required modules"
apache2_module:
name={{ item }}
name='{{ item }}'
state=present
with_items:
- rewrite
- vhost_alias
- ssl
- actions
- alias
- suexec
notify: "Apache | Restart Apache"
- name: "Apache | Disable modules"
apache2_module:
name={{ item }}
state=absent
with_items:
- php5
ignore_errors: yes
with_items: '{{ apache_modules }}'
notify: "Apache | Restart Apache"
- name: "Apache | Turn on Extended Status"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment