updated baas_cass_dc_list and variables used
diff --git a/templates/baas-silent-install.conf.j2 b/templates/baas-silent-install.conf.j2 index 47d065b..17e56f4 100644 --- a/templates/baas-silent-install.conf.j2 +++ b/templates/baas-silent-install.conf.j2
@@ -1,6 +1,6 @@ # Must resolve to IP address or DNS name of host - not to 127.0.0.1 or localhost. -HOSTIP={{ hostvars[public_address][interface_name].ipv4.address }} +HOSTIP={{ hostvars[public_address]['local_address'] }} # Define the API BaaS administrator account. # User name - default is "superuser". @@ -21,13 +21,13 @@ # Specify BaaS Cassandra connection information. # Specify the data center name. # Default is dc-1. -{% if groups['dc-1'] is defined and inventory_hostname in groups['dc-1'] and groups['dc-2'] is not defined %} +{% if groups['dc-1'] is defined and groups['dc-2'] is not defined %} BAAS_CASS_LOCALDC=dc-1 BAAS_CASS_DC_LIST=dc-1 REGION=dc-1 BAAS_CASS_REPLICATION=dc-1:{{ groups['dc-1-cassandra'] | length }} {% if opdk_version == '4.17.01' %} -BAAS_CLUSTER_SEEDS="{% for host in groups['dc-1-baas'] %}dc-1:{{ hostvars[host][interface_name].ipv4.address }}{% if not loop.last %},{% endif %}{% endfor %}" +BAAS_CLUSTER_SEEDS="{% for host in groups['dc-1-baas'] %}dc-1:{{ hostvars[host]['local_address'] }}{% if not loop.last %},{% endif %}{% endfor %}" {% endif %} {% elif groups['dc-2'] is defined %} {% if inventory_hostname in groups['dc-1'] %} @@ -41,7 +41,7 @@ BAAS_CASS_DC_LIST=dc-1,dc-2 BAAS_CASS_REPLICATION=dc-1:{{ groups['dc-1-cassandra'] | length }},dc-2:{{ groups['dc-2-cassandra'] | length }} {% if opdk_version == '4.17.01' %} -BAAS_CLUSTER_SEEDS="{% for host in groups['dc-1-baas'] %}dc-1:{{ hostvars[host][interface_name].ipv4.address }},{% endfor %}{% for host in groups['dc-2-baas'] %}dc-2:{{ hostvars[host][interface_name].ipv4.address }}{% if not loop.last %},{% endif %}{% endfor %}" +BAAS_CLUSTER_SEEDS="{% for host in groups['dc-1-baas'] %}dc-1:{{ hostvars[host]['local_address']}},{% endfor %}{% for host in groups['dc-2-baas'] %}dc-2:{{ hostvars[host]['local_address'] }}{% if not loop.last %},{% endif %}{% endfor %}" {% endif %} {% endif %}