diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2d281cd72..2560894ca 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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 diff --git a/reset.yml b/reset.yml index afc3f6e39..9cf504756 100644 --- a/reset.yml +++ b/reset.yml @@ -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 }