ex variables: mise au point
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
servername: cines.fr
|
apache_servername: cines.fr
|
||||||
serveralias: www.{{ servername }}
|
apache_serveralias: www.{{ servername }}
|
||||||
documentroot: /var/www/html/{{ servername }}
|
apache_documentroot: /var/www/html/{{ servername }}
|
||||||
accesslog: /var/log/httpd/access_{{ servername }}_log
|
apache_accesslog: /var/log/httpd/access_{{ servername }}_log
|
||||||
errorlog: /var/log/httpd/error_{{ servername }}_log
|
apache_errorlog: /var/log/httpd/error_{{ servername }}_log
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
servername: orsys.fr
|
apache_servername: orsys.fr
|
||||||
serveralias: www.orsys.fr
|
apache_serveralias: www.orsys.fr
|
||||||
documentroot: /var/www/html/orsys.fr
|
apache_documentroot: /var/www/html/orsys.fr
|
||||||
accesslog: /var/log/httpd/access_orsys.fr_log
|
apache_accesslog: /var/log/httpd/access_orsys.fr_log
|
||||||
errorlog: /var/log/httpd/error_orsys.fr_log
|
apache_errorlog: /var/log/httpd/error_orsys.fr_log
|
||||||
@@ -19,11 +19,11 @@ http_port: 80
|
|||||||
Hosts Variables:
|
Hosts Variables:
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
servername: orsys.fr
|
apache_servername: orsys.fr
|
||||||
serveralias: "www.orsys.fr"
|
apache_serveralias: "www.orsys.fr"
|
||||||
documentroot: /var/www/html/orsys.fr
|
apache_documentroot: /var/www/html/orsys.fr
|
||||||
accesslog: /var/log/httpd/access_orsys.fr_log
|
apache_accesslog: /var/log/httpd/access_orsys.fr_log
|
||||||
errorlog: /var/log/httpd/error_orsys.fr_log
|
apache_errorlog: /var/log/httpd/error_orsys.fr_log
|
||||||
|
|
||||||
Dependencies
|
Dependencies
|
||||||
------------
|
------------
|
||||||
|
|||||||
@@ -1,2 +1,3 @@
|
|||||||
---
|
---
|
||||||
# defaults file for myapache
|
# defaults file for myapache
|
||||||
|
http_port: 80
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
notify: reload httpd
|
notify: reload httpd
|
||||||
template:
|
template:
|
||||||
src: vhost.conf.jj
|
src: vhost.conf.jj
|
||||||
dest: /etc/httpd/conf.d/vhost_{{ servername }}.conf
|
dest: /etc/httpd/conf.d/vhost_{{ apache_servername }}.conf
|
||||||
mode: 0640
|
mode: 0640
|
||||||
owner: root
|
owner: root
|
||||||
group: apache
|
group: apache
|
||||||
@@ -40,11 +40,11 @@
|
|||||||
|
|
||||||
- name: create documentroot
|
- name: create documentroot
|
||||||
file:
|
file:
|
||||||
name: "{{ documentroot }}"
|
name: "{{ apache_documentroot }}"
|
||||||
state: directory
|
state: directory
|
||||||
|
|
||||||
- name: create index file
|
- name: create index file
|
||||||
template:
|
template:
|
||||||
src: index.html
|
src: index.html
|
||||||
dest: "{{ documentroot }}/index.html"
|
dest: "{{ apache_documentroot }}/index.html"
|
||||||
mode: 0644
|
mode: 0644
|
||||||
@@ -1 +1 @@
|
|||||||
<h1>hello World this is {{ servername}}</h1>
|
<h1>hello World this is {{ apache_servername}}</h1>
|
||||||
@@ -1,17 +1,17 @@
|
|||||||
<VirtualHost *:{{ http_port }}>
|
<VirtualHost *:{{ http_port }}>
|
||||||
ServerName {{ servername }}
|
ServerName {{ apache_servername }}
|
||||||
ServerAlias {{ serveralias }}
|
ServerAlias {{ apache_serveralias }}
|
||||||
ServerAlias {{ inventory_hostname }}
|
ServerAlias {{ inventory_hostname }}
|
||||||
DocumentRoot {{ documentroot }}
|
DocumentRoot {{ apache_documentroot }}
|
||||||
CustomLog {{ accesslog }} combined
|
CustomLog {{ apache_accesslog }} combined
|
||||||
ErrorLog {{ errorlog }}
|
ErrorLog {{ apache_errorlog }}
|
||||||
<Directory />
|
<Directory />
|
||||||
Options none
|
Options none
|
||||||
Allowoverride none
|
Allowoverride none
|
||||||
Require all denied
|
Require all denied
|
||||||
</Directory>
|
</Directory>
|
||||||
|
|
||||||
<Directory {{ documentroot }}>
|
<Directory {{ apache_documentroot }}>
|
||||||
Require all granted
|
Require all granted
|
||||||
</Directory>
|
</Directory>
|
||||||
</VirtualHost>
|
</VirtualHost>
|
||||||
@@ -1,3 +1,2 @@
|
|||||||
---
|
---
|
||||||
# vars file for myapache
|
# vars file for myapache
|
||||||
http_port: 80
|
|
||||||
Reference in New Issue
Block a user