Merge pull request #1033 from rutsky/reset-confirmation

ask confirmation before running reset.yml playbook
This commit is contained in:
Antoine Legrand 2017-02-16 16:10:58 +01:00 committed by GitHub
commit e89056a614
2 changed files with 12 additions and 0 deletions

View file

@ -196,6 +196,7 @@ before_script:
--private-key=${HOME}/.ssh/id_rsa
-e bootstrap_os=${BOOTSTRAP_OS}
-e ansible_python_interpreter=${PYPATH}
-e reset_confirmation=yes
reset.yml;
fi

View file

@ -1,5 +1,16 @@
---
- 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:
- { role: reset, tags: reset }