Issue #5: Allow apache_packages to be overridden.

This commit is contained in:
Jeff Geerling 2014-10-05 08:02:17 -05:00
parent a59400ef68
commit 83ab160cff
4 changed files with 21 additions and 2 deletions

View file

@ -1,6 +1,16 @@
--- ---
- name: Include OS-specific variables. - name: Include OS-specific variables.
include_vars: "{{ ansible_os_family }}.yml" include_vars: "{{ ansible_os_family }}.yml"
when: ansible_os_family == 'RedHat'
- name: Include OS-specific variables.
include_vars: "{{ ansible_os_family }}-{{ ansible_lsb.codename }}.yml"
when: ansible_os_family == 'Debian'
- name: Define apache_packages.
set_fact:
apache_packages: "{{ __apache_packages | list }}"
when: apache_packages is not defined
- include: setup-RedHat.yml - include: setup-RedHat.yml
when: ansible_os_family == 'RedHat' when: ansible_os_family == 'RedHat'

View file

@ -2,7 +2,7 @@
apache_daemon: apache2 apache_daemon: apache2
apache_server_root: /etc/apache2 apache_server_root: /etc/apache2
apache_conf_path: /etc/apache2/sites-enabled apache_conf_path: /etc/apache2/sites-enabled
apache_packages: __apache_packages:
- apache2 - apache2
- apache2-mpm-prefork - apache2-mpm-prefork
- apache2-utils - apache2-utils

9
vars/Debian-trusty.yml Normal file
View file

@ -0,0 +1,9 @@
---
apache_daemon: apache2
apache_server_root: /etc/apache2
apache_conf_path: /etc/apache2/sites-enabled
__apache_packages:
- apache2
- apache2-mpm-prefork
- apache2-utils
- apache2-bin

View file

@ -2,7 +2,7 @@
apache_daemon: httpd apache_daemon: httpd
apache_server_root: /etc/httpd apache_server_root: /etc/httpd
apache_conf_path: /etc/httpd/conf.d apache_conf_path: /etc/httpd/conf.d
apache_packages: __apache_packages:
- httpd - httpd
- httpd-devel - httpd-devel
- mod_ssl - mod_ssl