fix(ansible): guard archived destructive plays with confirm_destroy #219
@@ -7,8 +7,18 @@
|
||||
gitea_binary: "/usr/local/bin/gitea"
|
||||
gitea_conf_dir: "/etc/gitea"
|
||||
gitea_service_file: "/etc/systemd/system/gitea.service"
|
||||
|
||||
# Safety switch: must be set to true explicitly. This play is archived
|
||||
# (one-off cleanup of an accidental install) and deletes the gitea
|
||||
# service/binary/config/user on every host except gitea.srv.renner.uno
|
||||
# if run unguarded.
|
||||
confirm_destroy: false
|
||||
|
||||
tasks:
|
||||
- name: Safety Check
|
||||
ansible.builtin.fail:
|
||||
msg: "This archived playbook removes the gitea service/binary/config/user on all hosts except gitea.srv.renner.uno. You must run with -e 'confirm_destroy=true'."
|
||||
when: not confirm_destroy | bool
|
||||
|
||||
- name: Stop and disable gitea service
|
||||
systemd:
|
||||
name: gitea
|
||||
|
||||
@@ -2,7 +2,17 @@
|
||||
- name: Remove cpool storage and uninstall Ceph
|
||||
hosts: pve_cluster
|
||||
become: true
|
||||
vars:
|
||||
# Safety switch: must be set to true explicitly. This play is archived
|
||||
# (one-off Ceph decommission) and destroys ZFS volumes fleet-wide via
|
||||
# `zfs destroy -rf` if run unguarded.
|
||||
confirm_destroy: false
|
||||
tasks:
|
||||
- name: Safety Check
|
||||
ansible.builtin.fail:
|
||||
msg: "This archived playbook destroys Ceph OSD ZFS volumes and purges Ceph fleet-wide. You must run with -e 'confirm_destroy=true'."
|
||||
when: not confirm_destroy | bool
|
||||
|
||||
- name: Remove cpool configuration from Proxmox storage
|
||||
command: pvesm remove cpool
|
||||
register: pvesm_remove
|
||||
|
||||
Reference in New Issue
Block a user