updated vhost_alias logic
diff --git a/tasks/main.yml b/tasks/main.yml
index 33b2a35..b4dbb54 100644
--- a/tasks/main.yml
+++ b/tasks/main.yml
@@ -42,21 +42,21 @@
- name: Collect DC 1 RMP addresses
cache:
key: "vhost_alias"
- value: "{{ vhost_alias | trim }} {{ hostvars[item].public_address | trim }}"
+ value: "{{ vhost_alias | trim }} {{ hostvars[item].private_address | trim }}"
with_items: "{{ groups['dc-1-rmp'] }}"
when: groups['dc-1'] is defined and inventory_hostname in groups['dc-1']
- name: Collect DC 2 RMP addresses
cache:
key: "vhost_alias"
- value: "{{ vhost_alias | trim }} {{ hostvars[item].public_address | trim }}"
+ value: "{{ vhost_alias | trim }} {{ hostvars[item].private_address | trim }}"
with_items: "{{ groups['dc-2-rmp'] }}"
when: groups['dc-2'] is defined and inventory_hostname in groups['dc-2']
- name: Collect DC 3 RMP addresses
cache:
key: "vhost_alias"
- value: "{{ vhost_alias | trim }} {{ hostvars[item].public_address | trim }}"
+ value: "{{ vhost_alias | trim }} {{ hostvars[item].private_address | trim }}"
with_items: "{{ groups['dc-3-rmp'] }}"
when: groups['dc-3'] is defined and inventory_hostname in groups['dc-3']
when: load_balancer is not defined or load_balancer | trim | length == 0