Removed dash from group names
diff --git a/tasks/cassandra.yml b/tasks/cassandra.yml
index dfcf458..64bcb59 100644
--- a/tasks/cassandra.yml
+++ b/tasks/cassandra.yml
@@ -14,20 +14,20 @@
msg: 'ds group is not defined in the inventory file, please define the ds group in the inventory file'
when: groups['ds'] is not defined
-- name: Fail if dc-1 group is not provided
+- name: Fail if dc1 group is not provided
fail:
- msg: 'dc-1 group is not defined in the inventory file, please define the dc-1 group in the inventory file'
- when: groups['dc-1'] is not defined
+ msg: 'dc1 group is not defined in the inventory file, please define the dc1 group in the inventory file'
+ when: groups['dc1'] is not defined
-- name: Fail if dc-1-ds group is not provided
+- name: Fail if dc1-ds group is not provided
fail:
- msg: 'dc-1-ds group is not defined in the inventory file, please define the dc-1-ds group in the inventory file'
- when: groups['dc-1-ds'] is not defined
+ msg: 'dc1-ds group is not defined in the inventory file, please define the dc1-ds group in the inventory file'
+ when: groups['dc1-ds'] is not defined
-- name: Fail if dc-1-ms group is not provided
+- name: Fail if dc1-ms group is not provided
fail:
- msg: 'dc-1-ms group is not defined in the inventory file, please define the dc-1-ms group in the inventory file'
- when: groups['dc-1-ms'] is not defined
+ msg: 'dc1-ms group is not defined in the inventory file, please define the dc1-ms group in the inventory file'
+ when: groups['dc1-ms'] is not defined
- name: Construct cassandra hosts configuration
cassandra_hosts:
diff --git a/templates/baas-silent-install.conf.j2 b/templates/baas-silent-install.conf.j2
index e1f824d..e1d1ad9 100644
--- a/templates/baas-silent-install.conf.j2
+++ b/templates/baas-silent-install.conf.j2
@@ -19,36 +19,36 @@
# 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'] %}
-BAAS_CASS_LOCALDC=dc-1
-BAAS_CASS_DC_LIST=dc-1
-REGION=dc-1
+# Default is dc1.
+{% if groups['dc1'] is defined and inventory_hostname in groups['dc1'] %}
+BAAS_CASS_LOCALDC=dc1
+BAAS_CASS_DC_LIST=dc1
+REGION=dc1
# Replication is in the form "dataCenterName:#CassandraNodes".
-# For example, for dc-1 with three Cassandra nodes, it is dc-1:3.
-BAAS_CASS_REPLICATION=dc-1:{{ groups['dc-1-cassandra'] | length }}
+# For example, for dc1 with three Cassandra nodes, it is dc1:3.
+BAAS_CASS_REPLICATION=dc1:{{ groups['dc1-cassandra'] | length }}
{% if opdk_version == '4.17.01' %}
-BAAS_CLUSTER_SEEDS="{% for host in groups['dc-1-baas'] %}dc-1:{{ hostvars[host]['private_address'] }}{% if not loop.last %},{% endif %}{% endfor %}"
+BAAS_CLUSTER_SEEDS="{% for host in groups['dc1-baas'] %}dc1:{{ hostvars[host]['private_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-1,dc-2
-REGION=dc-2
+{% elif groups['dc2'] is defined and inventory_hostname in groups['dc2'] %}
+BAAS_CASS_LOCALDC=dc2
+BAAS_CASS_DC_LIST=dc1,dc2
+REGION=dc2
# Replication is in the form "dataCenterName:#CassandraNodes".
-# For example, for dc-1 with three Cassandra nodes, it is dc-1:3.
-BAAS_CASS_REPLICATION= dc-1:{{ groups['dc-1-cassandra'] | length }},dc-2:{{ groups['dc-2-cassandra'] | length }}
+# For example, for dc1 with three Cassandra nodes, it is dc1:3.
+BAAS_CASS_REPLICATION= dc1:{{ groups['dc1-cassandra'] | length }},dc2:{{ groups['dc2-cassandra'] | length }}
{% if opdk_version == '4.17.01' %}
-BAAS_CLUSTER_SEEDS="{% for host in groups['dc-1-baas'] %}dc-1:{{ hostvars[host]['private_address']}},{% endfor %}{% for host in groups['dc-2-baas'] %}dc-2:{{ hostvars[host]['private_address'] }}{% if not loop.last %},{% endif %}{% endfor %}"
+BAAS_CLUSTER_SEEDS="{% for host in groups['dc1-baas'] %}dc1:{{ hostvars[host]['private_address']}},{% endfor %}{% for host in groups['dc2-baas'] %}dc2:{{ hostvars[host]['private_address'] }}{% if not loop.last %},{% endif %}{% endfor %}"
{% endif %}
{% endif %}
# ElasticSearch IPs or DNS names, separated by spaces.
-{% if groups['dc-1-elastic'] is defined and inventory_hostname in groups['dc-1'] %}
-ES_HOSTS="{% for host in groups['dc-1-elastic'] %}{{ hostvars[host]['private_address'] }}{% if not loop.last %} {% endif %}{% endfor %}"
-{% elif groups['dc-2-elastic'] is defined and inventory_hostname in groups['dc-2'] %}
-ES_HOSTS="{% for host in groups['dc-2-elastic'] %}{{ hostvars[host]['private_address'] }}{% if not loop.last %} {% endif %}{% endfor %}"
+{% if groups['dc1-elastic'] is defined and inventory_hostname in groups['dc1'] %}
+ES_HOSTS="{% for host in groups['dc1-elastic'] %}{{ hostvars[host]['private_address'] }}{% if not loop.last %} {% endif %}{% endfor %}"
+{% elif groups['dc2-elastic'] is defined and inventory_hostname in groups['dc2'] %}
+ES_HOSTS="{% for host in groups['dc2-elastic'] %}{{ hostvars[host]['private_address'] }}{% if not loop.last %} {% endif %}{% endfor %}"
{% else %}
ES_HOSTS="{% for host in groups['elastic'] %}{{ hostvars[host]['private_address'] }}{% if not loop.last %} {% endif %}{% endfor %}"
{% endif %}
@@ -66,10 +66,10 @@
# API BaaS Portal information.
# URL and port number of load balancer, if there is one in front of the Portal, # or the URL and port of the Portal node.
-{% if groups['dc-1-portal'] is defined and inventory_hostname in groups['dc-1'] %}
-BAAS_PORTAL_URL="http://{{ hostvars[groups['dc-1-portal'][0]]['public_address'] }}:{{baas_portal_port }}"
-{% elif groups['dc-2-portal'] is defined and inventory_hostname in groups['dc-2'] %}
-BAAS_PORTAL_URL="http://{{ hostvars[groups['dc-2-portal'][0]]['public_address'] }}:{{ baas_portal_port }}"
+{% if groups['dc1-portal'] is defined and inventory_hostname in groups['dc1'] %}
+BAAS_PORTAL_URL="http://{{ hostvars[groups['dc1-portal'][0]]['public_address'] }}:{{baas_portal_port }}"
+{% elif groups['dc2-portal'] is defined and inventory_hostname in groups['dc2'] %}
+BAAS_PORTAL_URL="http://{{ hostvars[groups['dc2-portal'][0]]['public_address'] }}:{{ baas_portal_port }}"
{% else %}
BAAS_PORTAL_URL="http://{{ hostvars[groups['portal'][0]]['public_address'] }}:{{ baas_portal_port }}"
{% endif %}