This contains a lot of changes, including better system configuration for some issues discovered during testing, and minor tweaking for better user experience when doing maintenance
20 lines
632 B
YAML
20 lines
632 B
YAML
- hosts: all
|
|
gather_facts: no
|
|
vars_prompt:
|
|
- name: user_check
|
|
prompt: "You are about to destroy your cluster and uninstall k3s, this action is irreversible. Do you want to continue? (yes/no)"
|
|
private: no
|
|
tasks:
|
|
- name: Include vault vars
|
|
include_vars:
|
|
file: "{{ playbook_dir ~ '/vault/secrets' }}"
|
|
- name: Include vars
|
|
include_vars:
|
|
file: inventory/vars/main.yml
|
|
- name: Wait for hosts
|
|
ansible.builtin.wait_for_connection:
|
|
timeout: 60
|
|
- name: Uninstall k3s
|
|
ansible.builtin.import_playbook: k3s-ansible/reset.yml
|
|
when: user_check == "yes"
|