forked from aerospike-community/aerospike-ansible
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathremove-aerospike.yml
40 lines (32 loc) · 872 Bytes
/
remove-aerospike.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
- name: Uninstalling Aerospike
hosts: "{{ cluster_tag }}"
gather_facts: false
become: yes
remote_user: "{{ os_config['remote_user'] }}"
vars_files:
- vars/cluster-config.yml
- vars/constants.yml
- vars/os-level-config.yml
tasks:
- name: Get service facts
service_facts:
- name: Import configuration properties
include_vars:
dir: vars
- block:
- name: Stop Aerospike service
shell:
cmd: "service aerospike stop"
when: hostvars[inventory_hostname].services[aerospike_service_name] is defined
- name: Uninstall Aerospike Server
yum:
name:
- aerospike-server-community
- aerospike-server-enterprise
state: absent
- name: Uninstall Aerospike Tools
yum:
name: aerospike-tools
state: absent
- debug:
msg: "Aerospike uninstall complete"