updated to fix but with setting of observers
diff --git a/tasks/main.yml b/tasks/main.yml index 8f126db..25711d8 100644 --- a/tasks/main.yml +++ b/tasks/main.yml
@@ -24,6 +24,8 @@ group: '{{ opdk_group_name }}' mode: 0644 when: provided_response_file is not defined or not provided_response_file + tags: + - no-silent-install - name: Copy provided silent-install file copy: @@ -33,3 +35,5 @@ group: '{{ opdk_group_name }}' mode: 0644 when: provided_response_file is defined and provided_response_file + tags: + - no-silent-install
diff --git a/templates/silent-install.conf.j2 b/templates/silent-install.conf.j2 index c6d5fb8..80ed94d 100644 --- a/templates/silent-install.conf.j2 +++ b/templates/silent-install.conf.j2
@@ -28,7 +28,7 @@ {% endif %} USE_ZK_CLUSTER={{ opdk_use_zk_cluster }} -ZK_HOSTS="{% for host in groups['ds'] %}{{ hostvars[host][interface_name].ipv4.address }}{% if hostvars[host]['zk_observer'] is defined and hostvars[host]['zk_observer'] %}:observer{% endif %}{% if not loop.last %} {% endif %}{% endfor %}" +ZK_HOSTS="{% for host in groups['ds'] %}{{ hostvars[host][interface_name].ipv4.address }}{% if hostvars[host]['zk_observer'] is defined and hostvars[host]['zk_observer'] == 'true' %}:observer{% endif %}{% if not loop.last %} {% endif %}{% endfor %}" {% if groups['dc-1'] is defined and inventory_hostname in groups['dc-1'] %} ZK_CLIENT_HOSTS="{% for host in groups['dc-1-ds'] %}{{ hostvars[host][interface_name].ipv4.address }}{% if not loop.last %} {% endif %}{% endfor %}"