mise au point exercice variabilisation dun role
This commit is contained in:
@@ -3,7 +3,8 @@ Role Name
|
|||||||
|
|
||||||
Rôle de deploiement apache sur une centos.
|
Rôle de deploiement apache sur une centos.
|
||||||
|
|
||||||
1 seul vhost
|
1 seul vhost par machine
|
||||||
|
|
||||||
|
|
||||||
Requirements
|
Requirements
|
||||||
------------
|
------------
|
||||||
@@ -14,8 +15,12 @@ Role Variables
|
|||||||
--------------
|
--------------
|
||||||
|
|
||||||
http_port: 80
|
http_port: 80
|
||||||
|
|
||||||
|
Hosts Variables:
|
||||||
|
---------------
|
||||||
|
|
||||||
servername: orsys.fr
|
servername: orsys.fr
|
||||||
serveralias: "www.{{ servername }}"
|
serveralias: "www.orsys.fr"
|
||||||
documentroot: /var/www/html/orsys.fr
|
documentroot: /var/www/html/orsys.fr
|
||||||
accesslog: /var/log/httpd/access_orsys.fr_log
|
accesslog: /var/log/httpd/access_orsys.fr_log
|
||||||
errorlog: /var/log/httpd/error_orsys.fr_log
|
errorlog: /var/log/httpd/error_orsys.fr_log
|
||||||
|
|||||||
@@ -29,11 +29,11 @@
|
|||||||
|
|
||||||
- name: create documentroot
|
- name: create documentroot
|
||||||
file:
|
file:
|
||||||
name: "/var/www/html/{{ servername }}"
|
name: "{{ documentroot }}"
|
||||||
state: directory
|
state: directory
|
||||||
|
|
||||||
- name: create index file
|
- name: create index file
|
||||||
copy:
|
copy:
|
||||||
src: index.html
|
src: index.html
|
||||||
dest: "/var/www/html/{{ servername }}/index.html"
|
dest: "{{ documentroot }}/index.html"
|
||||||
mode: 0644
|
mode: 0644
|
||||||
Reference in New Issue
Block a user