diff --git a/roles/web_lb/templates/haproxy.cfg.j2 b/roles/web_lb/templates/haproxy.cfg.j2 index 3408fbb..3d700f9 100644 --- a/roles/web_lb/templates/haproxy.cfg.j2 +++ b/roles/web_lb/templates/haproxy.cfg.j2 @@ -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 diff --git a/roles/web_worker/templates/etc/apache2/sites-available/worker.conf.j2 b/roles/web_worker/templates/etc/apache2/sites-available/worker.conf.j2 index fdabe03..0b4c5dc 100644 --- a/roles/web_worker/templates/etc/apache2/sites-available/worker.conf.j2 +++ b/roles/web_worker/templates/etc/apache2/sites-available/worker.conf.j2 @@ -1,11 +1,11 @@ - 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 diff --git a/roles/web_worker/templates/var/www/worker/index.html.j2 b/roles/web_worker/templates/var/www/worker/index.html.j2 index db4edde..21ff59a 100644 --- a/roles/web_worker/templates/var/www/worker/index.html.j2 +++ b/roles/web_worker/templates/var/www/worker/index.html.j2 @@ -1 +1 @@ -

{{ ansible_hostname }}

+

{{ inventory_hostname }}