Use defaults instead of main vars for easier overriding.

This commit is contained in:
Jeff Geerling 2014-05-05 09:45:51 -05:00
parent d2401eb840
commit 2184538876
7 changed files with 39 additions and 33 deletions

View file

@ -10,7 +10,7 @@ None.
## Role Variables
Available variables are listed below, along with default values (see `vars/main.yml`):
Available variables are listed below, along with default values (see `defaults/main.yml`):
apache_enablerepo: ""

14
defaults/Debian.yml Normal file
View file

@ -0,0 +1,14 @@
---
apache_daemon: apache2
apache_server_root: /etc/apache2
apache_conf_path: /etc/apache2/sites-enabled
apache_packages:
- apache2
- apache2-mpm-prefork
- apache2-utils
- apache2.2-bin
- apache2.2-common
apache_vhosts:
- {servername: "local.dev", documentroot: "/var/www"}
apache_mods_enabled:
- rewrite.load

11
defaults/RedHat.yml Normal file
View file

@ -0,0 +1,11 @@
---
apache_daemon: httpd
apache_server_root: /etc/httpd
apache_conf_path: /etc/httpd/conf.d
apache_packages:
- httpd
- httpd-devel
- mod_ssl
- openssh
apache_vhosts:
- {servername: "local.dev", documentroot: "/var/www/html"}

10
defaults/main.yml Normal file
View file

@ -0,0 +1,10 @@
---
apache_enablerepo: ""
apache_listen_port: 80
apache_create_vhosts: true
apache_vhosts:
# Additional properties: 'serveradmin, extra_parameters'.
- {servername: "local.dev", documentroot: "/var/www/html"}

View file

@ -1,14 +1,2 @@
---
apache_daemon: apache2
apache_server_root: /etc/apache2
apache_conf_path: /etc/apache2/sites-enabled
apache_packages:
- apache2
- apache2-mpm-prefork
- apache2-utils
- apache2.2-bin
- apache2.2-common
apache_vhosts:
- {servername: "local.dev", documentroot: "/var/www"}
apache_mods_enabled:
- rewrite.load
# See defaults/Debian.yml

View file

@ -1,11 +1,2 @@
---
apache_daemon: httpd
apache_server_root: /etc/httpd
apache_conf_path: /etc/httpd/conf.d
apache_packages:
- httpd
- httpd-devel
- mod_ssl
- openssh
apache_vhosts:
- {servername: "local.dev", documentroot: "/var/www/html"}
# See defaults/RedHat.yml

View file

@ -1,10 +1,2 @@
---
apache_enablerepo: ""
apache_listen_port: 80
apache_create_vhosts: true
apache_vhosts:
# Additional properties: 'serveradmin, extra_parameters'.
- {servername: "local.dev", documentroot: "/var/www/html"}
# See defaults/main.yml