2
0

mise au point exercice variabilisation dun role

This commit is contained in:
2018-09-28 13:22:49 +02:00
parent a6d95b9c23
commit 34a54bfae1
2 changed files with 9 additions and 4 deletions

View File

@@ -3,7 +3,8 @@ Role Name
Rôle de deploiement apache sur une centos.
1 seul vhost
1 seul vhost par machine
Requirements
------------
@@ -14,8 +15,12 @@ Role Variables
--------------
http_port: 80
Hosts Variables:
---------------
servername: orsys.fr
serveralias: "www.{{ servername }}"
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

View File

@@ -29,11 +29,11 @@
- name: create documentroot
file:
name: "/var/www/html/{{ servername }}"
name: "{{ documentroot }}"
state: directory
- name: create index file
copy:
src: index.html
dest: "/var/www/html/{{ servername }}/index.html"
dest: "{{ documentroot }}/index.html"
mode: 0644