2
0

mise au point ex variable 2

This commit is contained in:
2018-09-28 13:31:05 +02:00
parent 9a2d09cb70
commit 8bcc522009
5 changed files with 36 additions and 21 deletions

View 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

View 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

View File

@@ -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
------------

View File

@@ -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 }}"

View File

@@ -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