|
12 | 12 | become: yes
|
13 | 13 | become_user: "{{ splunk.user }}"
|
14 | 14 | register: set_new_master
|
15 |
| - 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) |
| 15 | + 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) |
16 | 16 | changed_when: set_new_master.rc == 0
|
17 | 17 | retries: "{{ retry_num }}"
|
18 | 18 | delay: "{{ retry_delay }}"
|
19 | 19 | ignore_errors: yes
|
20 | 20 | notify:
|
21 | 21 | - Restart the splunkd service
|
22 | 22 | no_log: "{{ hide_password }}"
|
23 |
| - failed_when: set_new_master.rc != 0 and "Use 'splunk edit cluster-master' to edit information for this" not in set_new_master.stderr |
| 23 | + 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) |
24 | 24 |
|
25 | 25 | - name: Flush restart handlers
|
26 | 26 | meta: flush_handlers
|
|
32 | 32 | become: yes
|
33 | 33 | become_user: "{{ splunk.user }}"
|
34 | 34 | register: set_associated_site
|
35 |
| - 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) |
| 35 | + 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) |
36 | 36 | changed_when: set_associated_site.rc == 0
|
37 | 37 | retries: "{{ retry_num }}"
|
38 | 38 | delay: "{{ retry_delay }}"
|
39 | 39 | ignore_errors: yes
|
40 | 40 | notify:
|
41 | 41 | - Restart the splunkd service
|
42 | 42 | no_log: "{{ hide_password }}"
|
43 |
| - failed_when: set_associated_site.rc != 0 and 'No change in master or secret or site' not in set_associated_site.stderr |
| 43 | + 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 commit comments