From ffb064f650aca58309bbcb2f26da3db4f8187399 Mon Sep 17 00:00:00 2001 From: Vladimir Rutsky Date: Wed, 15 Feb 2017 21:04:28 +0300 Subject: [PATCH] ask confirmation before running reset.yml playbook --- reset.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) 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 }