Use only "inventory_hostname"
This commit is contained in:
parent
c5a8d99a77
commit
0cf850beb2
|
@ -46,7 +46,7 @@ backend nodes
|
|||
option httpchk HEAD / HTTP/1.1\r\nHost:localhost
|
||||
#server worker_01 172.22.244.81:80 check
|
||||
{% for host in groups['worker'] %}
|
||||
server {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_default_ipv4'].address }}:80 check
|
||||
server {{ hostvars[host]['inventory_hostname'] }} {{ hostvars[host]['ansible_default_ipv4'].address }}:80 check
|
||||
{% endfor %}
|
||||
|
||||
listen stats
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<VirtualHost *:80>
|
||||
ServerName {{ ansible_hostname }}
|
||||
ServerName {{ inventory_hostname }}
|
||||
DocumentRoot /var/www/worker
|
||||
|
||||
ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:4001/var/www/worker/$1
|
||||
|
||||
DirectoryIndex index.php index.xhtml index.html
|
||||
|
||||
ErrorLog ${APACHE_LOG_DIR}/worker_{{ ansible_hostname }}.error.log
|
||||
CustomLog ${APACHE_LOG_DIR}/worker_{{ ansible_hostname }}.access.log combined
|
||||
ErrorLog ${APACHE_LOG_DIR}/worker_{{ inventory_hostname }}.error.log
|
||||
CustomLog ${APACHE_LOG_DIR}/worker_{{ inventory_hostname }}.access.log combined
|
||||
</VirtualHost>
|
||||
|
|
|
@ -1 +1 @@
|
|||
<h1>{{ ansible_hostname }}</h1>
|
||||
<h1>{{ inventory_hostname }}</h1>
|
||||
|
|
Loading…
Reference in a new issue