Merge pull request #1033 from rutsky/reset-confirmation
ask confirmation before running reset.yml playbook
This commit is contained in:
commit
e89056a614
2 changed files with 12 additions and 0 deletions
|
@ -196,6 +196,7 @@ before_script:
|
||||||
--private-key=${HOME}/.ssh/id_rsa
|
--private-key=${HOME}/.ssh/id_rsa
|
||||||
-e bootstrap_os=${BOOTSTRAP_OS}
|
-e bootstrap_os=${BOOTSTRAP_OS}
|
||||||
-e ansible_python_interpreter=${PYPATH}
|
-e ansible_python_interpreter=${PYPATH}
|
||||||
|
-e reset_confirmation=yes
|
||||||
reset.yml;
|
reset.yml;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
11
reset.yml
11
reset.yml
|
@ -1,5 +1,16 @@
|
||||||
---
|
---
|
||||||
|
|
||||||
- hosts: all
|
- hosts: all
|
||||||
|
vars_prompt:
|
||||||
|
name: "reset_confirmation"
|
||||||
|
prompt: "Are you sure you want to reset cluster state? Type 'yes' to reset your cluster."
|
||||||
|
default: "no"
|
||||||
|
private: no
|
||||||
|
|
||||||
|
pre_tasks:
|
||||||
|
- name: check confirmation
|
||||||
|
fail: msg="Reset confirmation failed"
|
||||||
|
when: reset_confirmation != "yes"
|
||||||
|
|
||||||
roles:
|
roles:
|
||||||
- { role: reset, tags: reset }
|
- { role: reset, tags: reset }
|
||||||
|
|
Loading…
Reference in a new issue