mise au point ex variable 2
This commit is contained in:
11
17.2_variable/host_vars/cible1
Normal file
11
17.2_variable/host_vars/cible1
Normal file
@@ -0,0 +1,11 @@
|
||||
apache_vhosts:
|
||||
- servername: orsys.fr
|
||||
serveralias: www.orsys.fr
|
||||
documentroot: /var/www/html/orsys.fr
|
||||
accesslog: /var/log/httpd/access_orsys.fr_log
|
||||
errorlog: /var/log/httpd/error_orsys.fr_log
|
||||
- servername: thomas.fr
|
||||
serveralias: www.thomas.fr
|
||||
documentroot: /var/www/html/thomas.fr
|
||||
accesslog: /var/log/httpd/access_thomas.fr_log
|
||||
errorlog: /var/log/httpd/error_thomas.fr_log
|
||||
11
17.2_variable/host_vars/cible2
Normal file
11
17.2_variable/host_vars/cible2
Normal file
@@ -0,0 +1,11 @@
|
||||
apache_vhosts:
|
||||
- servername: foobar.com
|
||||
serveralias: www.foobar.com
|
||||
documentroot: /var/www/html/foobar.com
|
||||
accesslog: /var/log/httpd/access_foobar.com_log
|
||||
errorlog: /var/log/httpd/error_foobar.com_log
|
||||
- servername: AllYourBaseAreBelong2.us
|
||||
serveralias: www.AllYourBaseAreBelong2.us
|
||||
documentroot: /var/www/html/AllYourBaseAreBelong2.us
|
||||
accesslog: /var/log/httpd/access_AllYourBaseAreBelong2.us_log
|
||||
errorlog: /var/log/httpd/error_AllYourBaseAreBelong2.us_log
|
||||
@@ -3,7 +3,7 @@ Role Name
|
||||
|
||||
Rôle de deploiement apache sur une centos.
|
||||
|
||||
1 seul vhost
|
||||
more than 1 vhost per host
|
||||
|
||||
Requirements
|
||||
------------
|
||||
@@ -14,11 +14,15 @@ Role Variables
|
||||
--------------
|
||||
|
||||
http_port: 80
|
||||
servername: orsys.fr
|
||||
serveralias: "www.{{ servername }}"
|
||||
documentroot: /var/www/html/orsys.fr
|
||||
accesslog: /var/log/httpd/access_orsys.fr_log
|
||||
errorlog: /var/log/httpd/error_orsys.fr_log
|
||||
|
||||
Hosts variables
|
||||
--------------
|
||||
apache_vhosts:
|
||||
- servername: orsys.fr
|
||||
serveralias: "www.{{ servername }}"
|
||||
documentroot: /var/www/html/orsys.fr
|
||||
accesslog: /var/log/httpd/access_orsys.fr_log
|
||||
errorlog: /var/log/httpd/error_orsys.fr_log
|
||||
|
||||
Dependencies
|
||||
------------
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
- name: create documentroot
|
||||
file:
|
||||
name: "/var/www/html/{{ item.documentroot }}"
|
||||
name: "{{ item.documentroot }}"
|
||||
state: directory
|
||||
with_items:
|
||||
- "{{ apache_vhosts }}"
|
||||
@@ -37,7 +37,7 @@
|
||||
- name: create index file
|
||||
copy:
|
||||
src: index.html
|
||||
dest: "/var/www/html/{{ item.documentroot }}/index.html"
|
||||
dest: "{{ item.documentroot }}/index.html"
|
||||
mode: 0644
|
||||
with_items:
|
||||
- "{{ apache_vhosts }}"
|
||||
- "{{ apache_vhosts }}"
|
||||
|
||||
@@ -1,14 +1,3 @@
|
||||
---
|
||||
# vars file for myapache
|
||||
http_port: 80
|
||||
apache_vhosts:
|
||||
- servername: orsys.fr
|
||||
serveralias: www.orsys.fr
|
||||
documentroot: /var/www/html/orsys.fr
|
||||
accesslog: /var/log/httpd/access_orsys.fr_log
|
||||
errorlog: /var/log/httpd/error_orsys.fr_log
|
||||
- servername: thomas.fr
|
||||
serveralias: www.thomas.fr
|
||||
documentroot: /var/www/html/thomas.fr
|
||||
accesslog: /var/log/httpd/access_thomas.fr_log
|
||||
errorlog: /var/log/httpd/error_thomas.fr_log
|
||||
http_port: 80
|
||||
Reference in New Issue
Block a user