Add remove capability
This commit is contained in:
parent
e6f230be2e
commit
45822f405f
5 changed files with 79 additions and 14 deletions
44
tasks/uninstall.yml
Normal file
44
tasks/uninstall.yml
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
---
|
||||
- name: Remove OSSEC server packages
|
||||
package:
|
||||
name: '{{ ossec_server_packages }}'
|
||||
state: absent
|
||||
update_cache: yes
|
||||
when:
|
||||
- ossec_server == true
|
||||
|
||||
- name: Remove OSSEC client packages
|
||||
package:
|
||||
name: '{{ ossec_client_packages }}'
|
||||
state: absent
|
||||
update_cache: yes
|
||||
when:
|
||||
- ossec_client == true
|
||||
|
||||
- name: Remove yum repository definition
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: absent
|
||||
with_items:
|
||||
- "/etc/yum.repos.d/atomic.repo"
|
||||
- "/etc/pki/rpm-gpg/RPM-GPG-KEY.atomicorp.txt"
|
||||
when:
|
||||
- ansible_os_family == 'RedHat'
|
||||
|
||||
- name: Remove Ubuntu Atomic repository
|
||||
apt_repository:
|
||||
repo: deb https://updates.atomicorp.com/channels/atomic/ubuntu {{ ansible_distribution_name }}
|
||||
filename: atomic.list
|
||||
state: absent
|
||||
update_cache: yes
|
||||
when:
|
||||
- ansible_distribution == "Ubuntu"
|
||||
|
||||
- name: Remove Debian Atomic repository
|
||||
apt_repository:
|
||||
repo: deb https://updates.atomicorp.com/channels/atomic/debian {{ ansible_distribution_name }}
|
||||
filename: atomic.list
|
||||
state: absent
|
||||
update_cache: yes
|
||||
when:
|
||||
- ansible_distribution == "Debian"
|
||||
Loading…
Add table
Add a link
Reference in a new issue