43 lines
913 B
YAML
43 lines
913 B
YAML
- name: stop certstore
|
|
systemd:
|
|
name: certstore
|
|
state: stopped
|
|
enabled: no
|
|
when:
|
|
- backup.certstore == 1
|
|
- uninstall.certstore == 1
|
|
ignore_errors: true
|
|
|
|
- name: create backup_dest_path
|
|
file:
|
|
path: "{{ backup_dest_path }}"
|
|
state: directory
|
|
when: backup.certstore == 1
|
|
|
|
- name: backup /opt/tsg/certstore to destination path
|
|
archive:
|
|
path: /opt/tsg/certstore
|
|
dest: "{{ backup_dest_path }}/certstore_{{ uninstall_version }}_{{ date }}.zip"
|
|
format: zip
|
|
when: backup.certstore == 1
|
|
|
|
- name: uninstall certstore
|
|
yum:
|
|
name:
|
|
- "{{ certstore }}"
|
|
state: absent
|
|
when: uninstall.certstore == 1
|
|
|
|
- name: remove certstore files
|
|
file:
|
|
path: /opt/tsg/certstore
|
|
state: absent
|
|
when: remove.certstore == 1
|
|
|
|
- name: remove certstore.service
|
|
file:
|
|
path: /usr/lib/systemd/system/certstore.service
|
|
state: absent
|
|
when: remove.certstore == 1
|
|
|