You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
949 B
37 lines
949 B
---
|
|
- name: Supprimer Splunk de Linux
|
|
hosts: splunk_hf_Linux
|
|
become: true
|
|
become_user: root
|
|
vars:
|
|
splunk_dir: "/opt/splunk"
|
|
tasks:
|
|
- name: Arrêter tous les processus Splunk en cours d'exécution
|
|
shell: "{{ splunk_dir }}/bin/splunk stop"
|
|
ignore_errors: true
|
|
|
|
- name: Désinstaller le service Splunk
|
|
shell: "{{ splunk_dir }}/bin/splunk disable boot-start"
|
|
|
|
- name: Supprimer le répertoire d'installation de Splunk
|
|
file:
|
|
path: "{{ splunk_dir }}"
|
|
state: absent
|
|
|
|
- name: Supprimer l'utilisateur Splunk et son groupe
|
|
user:
|
|
name: splunk
|
|
state: absent
|
|
ignore_errors: true
|
|
|
|
- name: Supprimer les entrées de démarrage automatique de Splunk
|
|
file:
|
|
path: "{{ item }}"
|
|
state: absent
|
|
with_items:
|
|
- /etc/init.d/splunk
|
|
- /etc/systemd/system/splunk.service
|
|
|
|
- name: "Shutdown VM"
|
|
shell: shutdown -r now
|