Skip to content

Commit

Permalink
Merge pull request #627 from splunk/develop
Browse files Browse the repository at this point in the history
8.2.0 release fix
  • Loading branch information
alishamayor authored May 26, 2021
2 parents e41cf20 + 22b55f9 commit c2bde29
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion roles/splunk_monitor/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
- name: Create list of clusterMaster peers
set_fact:
cluster_master_peers: "{{ cluster_master_peers }} + [ '{{ item }}' ]"
with_items: "{{ clusterMaster_peers_info['json']['entry'] | selectattr('content.host_port_pair','defined') | map(attribute='content.host_port_pair') }}"
with_items: "{{ clusterMaster_peers_info['json']['entry'] | selectattr('content.host_port_pair','defined') | map(attribute='content.host_port_pair') |list}}"
when: splunk_indexer_cluster or splunk.multisite_master is defined

- name: Fetch distributed peers when cm is defined
Expand Down
8 changes: 4 additions & 4 deletions roles/splunk_monitor/tasks/setup_multisite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
become: yes
become_user: "{{ splunk.user }}"
register: set_new_master
until: set_new_master.rc == 0 or (set_new_master.rc != 0 and "Cannot edit this searchhead. Use 'splunk edit cluster-master' to edit information for this searchhead." in set_new_master.stderr)
failed_when: set_new_master.rc != 0 and "Cannot edit this searchhead. Use 'splunk edit cluster-master' to edit information for this searchhead." not in set_new_master.stderr
until: set_new_master.rc == 0 or (set_new_master.rc != 0 and "Cannot edit this searchhead. Use 'splunk edit cluster-master' to edit information for this searchhead." in set_new_master.stderr) or (set_new_master.rc != 0 and "Cannot edit this searchhead. Use 'splunk edit cluster-manager' to edit information for this searchhead." in set_new_master.stderr)
failed_when: (set_new_master.rc != 0 and "Cannot edit this searchhead. Use 'splunk edit cluster-master' to edit information for this searchhead." not in set_new_master.stderr) or (set_new_master.rc != 0 and "Cannot edit this searchhead. Use 'splunk edit cluster-manager' to edit information for this searchhead." not in set_new_master.stderr)
changed_when: set_new_master.rc == 0
retries: "{{ retry_num }}"
delay: "{{ retry_delay }}"
Expand All @@ -32,12 +32,12 @@
become: yes
become_user: "{{ splunk.user }}"
register: set_associated_site
until: set_associated_site.rc == 0 or (set_associated_site.rc == 22 and 'No change in master or secret or site' in set_associated_site.stderr)
until: set_associated_site.rc == 0 or (set_associated_site.rc == 22 and 'No change in master or secret or site.' in set_associated_site.stderr) or (set_associated_site.rc == 22 and 'No change in manager or secret or site.' in set_associated_site.stderr)
changed_when: set_associated_site.rc == 0
retries: "{{ retry_num }}"
delay: "{{ retry_delay }}"
ignore_errors: yes
notify:
- Restart the splunkd service
no_log: "{{ hide_password }}"
failed_when: set_associated_site.rc != 0 and 'No change in master or secret or site' not in set_associated_site.stderr
failed_when: (set_associated_site.rc != 0 and 'No change in master or secret or site.' not in set_associated_site.stderr) or (set_associated_site.rc != 0 and 'No change in manager or secret or site.' not in set_associated_site.stderr)
8 changes: 4 additions & 4 deletions roles/splunk_search_head/tasks/setup_multisite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
become: yes
become_user: "{{ splunk.user }}"
register: set_new_master
until: set_new_master.rc == 0 or (set_new_master.rc != 0 and "Cannot edit this searchhead. Use 'splunk edit cluster-master' to edit information for this searchhead." in set_new_master.stderr)
failed_when: set_new_master.rc != 0 and "Cannot edit this searchhead. Use 'splunk edit cluster-master' to edit information for this searchhead." not in set_new_master.stderr
until: set_new_master.rc == 0 or (set_new_master.rc != 0 and "Cannot edit this searchhead. Use 'splunk edit cluster-master' to edit information for this searchhead." in set_new_master.stderr) or (set_new_master.rc != 0 and "Cannot edit this searchhead. Use 'splunk edit cluster-manager' to edit information for this searchhead." in set_new_master.stderr)
failed_when: (set_new_master.rc != 0 and "Cannot edit this searchhead. Use 'splunk edit cluster-master' to edit information for this searchhead." not in set_new_master.stderr) or (set_new_master.rc != 0 and "Cannot edit this searchhead. Use 'splunk edit cluster-manager' to edit information for this searchhead." not in set_new_master.stderr)
changed_when: set_new_master.rc == 0
retries: "{{ retry_num }}"
delay: "{{ retry_delay }}"
Expand All @@ -32,12 +32,12 @@
become: yes
become_user: "{{ splunk.user }}"
register: set_associated_site
until: set_associated_site.rc == 0 or (set_associated_site.rc == 22 and 'No change in master or secret or site' in set_associated_site.stderr)
until: set_associated_site.rc == 0 or (set_associated_site.rc == 22 and 'No change in master or secret or site.' in set_associated_site.stderr) or (set_associated_site.rc == 22 and 'No change in manager or secret or site.' in set_associated_site.stderr)
changed_when: set_associated_site.rc == 0
retries: "{{ retry_num }}"
delay: "{{ retry_delay }}"
ignore_errors: yes
notify:
- Restart the splunkd service
no_log: "{{ hide_password }}"
failed_when: set_associated_site.rc != 0 and 'No change in master or secret or site' not in set_associated_site.stderr
failed_when: (set_associated_site.rc != 0 and 'No change in master or secret or site.' not in set_associated_site.stderr) or (set_associated_site.rc != 0 and 'No change in manager or secret or site.' not in set_associated_site.stderr)
8 changes: 4 additions & 4 deletions roles/splunk_search_head_captain/tasks/setup_multisite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
become: yes
become_user: "{{ splunk.user }}"
register: set_new_master
until: set_new_master.rc == 0 or (set_new_master.rc == 22 and "Use 'splunk edit cluster-master' to edit information for this" in set_new_master.stderr)
until: set_new_master.rc == 0 or (set_new_master.rc == 22 and "Use 'splunk edit cluster-master' to edit information for this." in set_new_master.stderr) or (set_new_master.rc == 22 and "Use 'splunk edit cluster-manager' to edit information for this." in set_new_master.stderr)
changed_when: set_new_master.rc == 0
retries: "{{ retry_num }}"
delay: "{{ retry_delay }}"
ignore_errors: yes
notify:
- Restart the splunkd service
no_log: "{{ hide_password }}"
failed_when: set_new_master.rc != 0 and "Use 'splunk edit cluster-master' to edit information for this" not in set_new_master.stderr
failed_when: (set_new_master.rc != 0 and "Use 'splunk edit cluster-master' to edit information for this." not in set_new_master.stderr) or (set_new_master.rc != 0 and "Use 'splunk edit cluster-manager' to edit information for this." not in set_new_master.stderr)

- name: Flush restart handlers
meta: flush_handlers
Expand All @@ -32,12 +32,12 @@
become: yes
become_user: "{{ splunk.user }}"
register: set_associated_site
until: set_associated_site.rc == 0 or (set_associated_site.rc == 22 and 'No change in master or secret or site' in set_associated_site.stderr)
until: set_associated_site.rc == 0 or (set_associated_site.rc == 22 and 'No change in master or secret or site.' in set_associated_site.stderr) or (set_associated_site.rc == 22 and 'No change in manager or secret or site.' in set_associated_site.stderr)
changed_when: set_associated_site.rc == 0
retries: "{{ retry_num }}"
delay: "{{ retry_delay }}"
ignore_errors: yes
notify:
- Restart the splunkd service
no_log: "{{ hide_password }}"
failed_when: set_associated_site.rc != 0 and 'No change in master or secret or site' not in set_associated_site.stderr
failed_when: (set_associated_site.rc != 0 and 'No change in master or secret or site.' not in set_associated_site.stderr) or (set_associated_site.rc != 0 and 'No change in manager or secret or site.' not in set_associated_site.stderr)

0 comments on commit c2bde29

Please sign in to comment.