-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathdse_install.yml
72 lines (64 loc) · 1.49 KB
/
dse_install.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
---
# Get the current timestamp and register datastx debian packages
- hosts: dse
any_errors_fatal: true
become: true
become_method: sudo
tasks:
- name: Get the current timestamp
shell: 'date +%Y%m%d%H%M%S'
register: current_timestamp
roles:
- { role: datastax_pkg }
# Install and configure DSE
- hosts: dse
any_errors_fatal: true
become: true
become_method: sudo
roles:
- { role: dse_common }
- { role: dse_instbin }
- { role: dse_updcfg }
# Start DSE seed nodes
- hosts: dse
any_errors_fatal: true
name: Start seed node first one by one
serial: 1
become: true
become_method: sudo
vars:
srvc_name: dse
roles:
- { role: start_srvc, when: seed == 'true' }
# tasks:
# - name: test
# when: seed|int == 1
# debug:
# msg: "{{ ansible_all_ipv4_addresses }}"
# Start DSE non-seed nodes
- hosts: dse
any_errors_fatal: true
name: Start non-seed node first one by one
serial: 1
become: true
become_method: sudo
vars:
srvc_name: dse
roles:
- { role: start_srvc, when: seed == 'false' }
# tasks:
# - name: test
# when: seed|int == 0
# debug:
# msg: "{{ ansible_all_ipv4_addresses }}"
# Check DSE version and C* version
- hosts: dse
tasks:
- name: Check Cassandra version
command: "nodetool version"
register: _cassandra_ver
- name: Check DSE version
command: "dse -v"
register: _dse_ver
- debug:
msg: "DSE Version: {{ _dse_ver.stdout }}; Cassandra Version: {{ _cassandra_ver.stdout }}"