41 lines
1.5 KiB
YAML
41 lines
1.5 KiB
YAML
|
---
|
||
|
- name: orientdb_removal | Remove OrientDB
|
||
|
tags: ['orientdb']
|
||
|
block:
|
||
|
- name: orientdb_removal | Ensure that the service is disabled and stopped
|
||
|
ansible.builtin.service:
|
||
|
name: orientdb
|
||
|
state: stopped
|
||
|
enabled: false
|
||
|
- name: orientdb_removal | Remove the orientdb SysV startup file
|
||
|
ansible.builtin.file:
|
||
|
dest: /etc/init.d/orientdb
|
||
|
state: absent
|
||
|
when: ansible_service_mgr != 'systemd'
|
||
|
- name: orientdb_removal | Remove the orientdb systemd unit
|
||
|
ansible.builtin.file:
|
||
|
dest: /usr/lib/systemd/system/orientdb.service
|
||
|
state: absent
|
||
|
when: ansible_service_mgr == 'systemd'
|
||
|
- name: orientdb_removal | Remove the link to the orientdb distribution
|
||
|
ansible.builtin.file:
|
||
|
dest: "{{ orientdb_home_prefix }}/{{ orientdb_user }}/{{ orientdb_dir }}"
|
||
|
state: absent
|
||
|
- name: orientdb_removal | Remove the default options file
|
||
|
ansible.builtin.file:
|
||
|
dest: /etc/default/orientdb
|
||
|
state: absent
|
||
|
- name: orientdb_removal | Remove the backup cleaner script
|
||
|
ansible.builtin.file:
|
||
|
dest: /usr/local/bin/orientdb-backup-cleaner
|
||
|
state: absent
|
||
|
- name: orientdb_removal | Remove the backup cleaner cron job
|
||
|
ansible.builtin.cron:
|
||
|
cron_file: orientdb-backup-cleaner
|
||
|
disabled: false
|
||
|
job: "/usr/local/bin/orientdb-backup-cleaner >/dev/null 2>&1"
|
||
|
special_time: daily
|
||
|
user: '{{ orientdb_user }}'
|
||
|
name: "Remove old orientdb backups"
|
||
|
state: absent
|