Variable: mise au point
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
- name: install apache via ansible playbook
|
- name: install apache via ansible playbook
|
||||||
hosts: test
|
hosts: centos
|
||||||
user: ansible
|
user: ansible
|
||||||
become: true
|
become: true
|
||||||
roles:
|
roles:
|
||||||
|
|||||||
@@ -19,11 +19,11 @@ http_port: 80
|
|||||||
Hosts Variables:
|
Hosts Variables:
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
apache_servername: orsys.fr
|
apache_servername: no default
|
||||||
apache_serveralias: "www.orsys.fr"
|
apache_serveralias: no default
|
||||||
apache_documentroot: /var/www/html/orsys.fr
|
apache_documentroot: /var/www/html/{{ apache_servername }}
|
||||||
apache_accesslog: /var/log/httpd/access_orsys.fr_log
|
apache_accesslog: /var/log/httpd/access_{{ apache_servername }}_log
|
||||||
apache_errorlog: /var/log/httpd/error_orsys.fr_log
|
apache_errorlog: /var/log/httpd/error_{{ apache_servername }}_log
|
||||||
|
|
||||||
Dependencies
|
Dependencies
|
||||||
------------
|
------------
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
---
|
---
|
||||||
# defaults file for myapache
|
# defaults file for myapache
|
||||||
http_port: 80
|
http_port: 80
|
||||||
|
apache_documentroot: "/var/www/html/{{ apache_servername }}"
|
||||||
|
apache_accesslog: "/var/log/httpd/access_{{ apache_servername }}_log"
|
||||||
|
apache_errorlog: "/var/log/httpd/error_{{ apache_servername }}_log"
|
||||||
|
|||||||
@@ -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_{{ apache_servername }}.conf
|
dest: "/etc/httpd/conf.d/vhost_{{ apache_servername }}.conf"
|
||||||
mode: 0640
|
mode: 0640
|
||||||
owner: root
|
owner: root
|
||||||
group: apache
|
group: apache
|
||||||
|
|||||||
Reference in New Issue
Block a user