diff --git a/tasks/main.yml b/tasks/main.yml index 28a4db5e..db0d99e8 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,6 +1,16 @@ --- - name: Include OS-specific variables. 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 when: ansible_os_family == 'RedHat' diff --git a/vars/Debian.yml b/vars/Debian-precise.yml similarity index 91% rename from vars/Debian.yml rename to vars/Debian-precise.yml index d2d17066..62f51e28 100644 --- a/vars/Debian.yml +++ b/vars/Debian-precise.yml @@ -2,7 +2,7 @@ apache_daemon: apache2 apache_server_root: /etc/apache2 apache_conf_path: /etc/apache2/sites-enabled -apache_packages: +__apache_packages: - apache2 - apache2-mpm-prefork - apache2-utils diff --git a/vars/Debian-trusty.yml b/vars/Debian-trusty.yml new file mode 100644 index 00000000..cfcaa8a9 --- /dev/null +++ b/vars/Debian-trusty.yml @@ -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 diff --git a/vars/RedHat.yml b/vars/RedHat.yml index 04a0e7b5..e69d549c 100644 --- a/vars/RedHat.yml +++ b/vars/RedHat.yml @@ -2,7 +2,7 @@ apache_daemon: httpd apache_server_root: /etc/httpd apache_conf_path: /etc/httpd/conf.d -apache_packages: +__apache_packages: - httpd - httpd-devel - mod_ssl