2
0

Variable: mise au point

This commit is contained in:
2020-05-07 11:01:40 +02:00
parent 3440a5ec26
commit c8166488a1
4 changed files with 11 additions and 8 deletions

View File

@@ -1,6 +1,6 @@
---
- name: install apache via ansible playbook
hosts: test
hosts: centos
user: ansible
become: true
roles:

View File

@@ -19,11 +19,11 @@ http_port: 80
Hosts Variables:
---------------
apache_servername: orsys.fr
apache_serveralias: "www.orsys.fr"
apache_documentroot: /var/www/html/orsys.fr
apache_accesslog: /var/log/httpd/access_orsys.fr_log
apache_errorlog: /var/log/httpd/error_orsys.fr_log
apache_servername: no default
apache_serveralias: no default
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
Dependencies
------------

View File

@@ -1,3 +1,6 @@
---
# 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"

View File

@@ -19,7 +19,7 @@
notify: reload httpd
template:
src: vhost.conf.jj
dest: /etc/httpd/conf.d/vhost_{{ apache_servername }}.conf
dest: "/etc/httpd/conf.d/vhost_{{ apache_servername }}.conf"
mode: 0640
owner: root
group: apache