-
Notifications
You must be signed in to change notification settings - Fork 16
/
upgrade_splunk.yml
38 lines (33 loc) · 1.33 KB
/
upgrade_splunk.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
---
- hosts: "*:!repository"
user: root
pre_tasks:
- name: Stop all nodes
command: "{{ splunk_installation.splunk_home_path }}/bin/splunk stop"
become: true
become_user: splunk
become_method: su
when: "'deployer' not in group_names"
roles:
- { role: upgrade_master, when: "'masternode' in group_names" }
- { role: upgrade_peers, when: "'masternode' not in group_names and 'deployer' not in group_names" }
- { role: upgrade_peers, when: "'deployer' in group_names" }
post_tasks:
- name: Start deployer
command: "{{ splunk_installation.splunk_home_path }}/bin/splunk start --accept-license --answer-yes"
become: true
become_user: splunk
become_method: su
when: "'deployer' in group_names"
- name: Start remaining nodes
command: "{{ splunk_installation.splunk_home_path }}/bin/splunk start --accept-license --answer-yes"
become: true
become_user: splunk
become_method: su
when: "'deployer' not in group_names and 'masternode' not in group_names"
- name: Disable maintenance mode
command: "{{ splunk_installation.splunk_home_path }}/bin/splunk disable maintenance-mode -auth admin:{{ splunk_installation.admin_password }}"
become: true
become_user: splunk
become_method: su
when: "'masternode' in group_names"