Skip to content

Commit

Permalink
Add confirmation prompt again
Browse files Browse the repository at this point in the history
  • Loading branch information
forselli-stratio committed May 18, 2021
1 parent beaa9e0 commit 72466cf
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions remove-node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,23 @@
- name: Ensure compatibility with old groups
import_playbook: legacy_groups.yml

- hosts: "{{ node | default('etcd:k8s_cluster:calico_rr') }}"
gather_facts: no
environment: "{{ proxy_disable_env }}"
tasks:
- name: Confirm Execution
pause:
prompt: "Are you sure you want to delete nodes state? Type 'yes' to delete nodes."
register: pause_result
run_once: True
when:
- not (skip_confirmation | default(false) | bool)

- name: Fail if user does not confirm deletion
fail:
msg: "Delete nodes confirmation failed"
when: pause_result.user_input | default('yes') != 'yes'

- hosts: kube_control_plane[0]
gather_facts: no
environment: "{{ proxy_disable_env }}"
Expand Down

0 comments on commit 72466cf

Please sign in to comment.