-
Notifications
You must be signed in to change notification settings - Fork 1
/
CentOS7x_Uninstall-Demon-checkForTeamUpdates-playbook.yml
55 lines (41 loc) · 1.92 KB
/
CentOS7x_Uninstall-Demon-checkForTeamUpdates-playbook.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
---
################################################################################
# description: Uninstalls demon_checkForTeamUpdates on CentOS7x
# usage: ansible-playbook CentOS7x_Uninstall-Demon-checkForTeamUpdates-playbook.yml --extra-vars 'HostOrGroup=YourServerOrGroupNameGoesHere'
# author: Ernest G. Wilson II <[email protected]> (https://github.com/ernestgwilsonii)
# license: MIT
################################################################################
# Ansible Playbook options
# REF: http://docs.ansible.com/ansible/playbooks.html
#####################################################
- name: Uninstall demon_checkForTeamUpdates on CentOS7x
hosts: "{{ HostOrGroup|default ('FATAL ERROR --> HostOrGroup NOT SET! You must specify either a Host or a Group name!') }}"
serial: "100%"
gather_facts: False
tasks:
# service - Manage services
# REF: http://docs.ansible.com/ansible/service_module.html
##########################################################
- name: Stop and disable the systemctl demon_checkForTeamUpdates service
service:
name: demon_checkForTeamUpdates
enabled: no
state: stopped
# file - Sets attributes of files and folders
# REF: http://docs.ansible.com/ansible/file_module.html
#######################################################
# /opt/demon_checkForTeamUpdates
- name: Delete /opt/demon_checkForTeamUpdates
file:
path: /opt/demon_checkForTeamUpdates
state: absent
# /etc/systemd/system/demon_checkForTeamUpdates.service
- name: Delete systemctl service file /etc/systemd/system/demon_checkForTeamUpdates.service
file:
path: /etc/systemd/system/demon_checkForTeamUpdates.service
state: absent
# raw - Executes a low-down and dirty SSH command
# REF: http://docs.ansible.com/ansible/raw_module.html
######################################################
- name: systemctl daemon-reload
shell: systemctl daemon-reload