diff --git a/roles/centos7/dashboards/tasks/etchosts.yml b/roles/centos7/dashboards/tasks/etchosts.yml index b9b42b2..e7b614f 100644 --- a/roles/centos7/dashboards/tasks/etchosts.yml +++ b/roles/centos7/dashboards/tasks/etchosts.yml @@ -3,7 +3,7 @@ blockinfile: dest: /etc/hosts block: |- - {% for item in groups['os-cluster'] %} + {% for item in groups['dashboards'] %} {{ hostvars[item]['ip'] }} {{ item }}.{{ domain_name }} {{ item }} {% endfor %} state: present diff --git a/roles/centos7/opensearch/tasks/main.yml b/roles/centos7/opensearch/tasks/main.yml index db155dd..1b9c8b7 100644 --- a/roles/centos7/opensearch/tasks/main.yml +++ b/roles/centos7/opensearch/tasks/main.yml @@ -40,3 +40,4 @@ - name: Show the opensearch status debug: msg: "{{ os_status.stdout }}" + failed_when: "'number_of_nodes' not in os_status.stdout"