added ignore file
diff --git a/templates/baas-silent-install.conf.j2 b/templates/baas-silent-install.conf.j2 index 756aa2d..0376c80 100644 --- a/templates/baas-silent-install.conf.j2 +++ b/templates/baas-silent-install.conf.j2
@@ -8,13 +8,6 @@ AS_ADMIN_EMAIL={{ baas_superuser_email }} AS_PASSWD={{ baas_superuser_pass }} -{# TODO: Build a module that discover the region of the inventory_hostname and update the REGION #} -{% if groups['dc-1'] is defined and inventory_hostname in groups['dc-1'] %} -REGION=dc-1 -{% elif groups['dc-2'] is defined and inventory_hostname in groups['dc-2'] %} -REGION=dc-2 -{% endif %} - # Specify Cassandra configuration information. CASS_HOSTS="{{ cassandra_hosts }}" @@ -31,25 +24,19 @@ {% if groups['dc-1'] is defined and inventory_hostname in groups['dc-1'] %} 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 %}" {% endif %} {% elif groups['dc-2'] is defined and inventory_hostname in groups['dc-2'] %} BAAS_CASS_LOCALDC=dc-2 BAAS_CASS_DC_LIST="dc-2" -{% if opdk_version == '4.17.01' %} -BAAS_CLUSTER_SEEDS="{% for host in groups['dc-2-baas'] %}dc-2:{{ hostvars[host][interface_name].ipv4.address }}{% if not loop.last %},{% endif %}{% endfor %}" -{% endif %} -{% endif %} - -# Replication is in the form "dataCenterName:#CassandraNodes". -# For example, for dc-1 with three Cassandra nodes, it is dc-1:3. -{% if groups['dc-1-cassandra'] is defined and inventory_hostname in groups['dc-1'] %} -BAAS_CASS_REPLICATION=dc-1:{{ groups['dc-1-cassandra'] | length }} -{% elif groups['dc-2-cassandra'] is defined and inventory_hostname in groups['dc-2'] %} +REGION=dc-2 BAAS_CASS_REPLICATION=dc-2:{{ groups['dc-2-cassandra'] | length }} -{% else %} -BAAS_CASS_REPLICATION=dc-1:{{ groups['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 %}" +{% endif %} {% endif %} # ElasticSearch IPs or DNS names, separated by spaces.