From ab96fb9aa478e05a1404864216a2fdd92b7cd3f5 Mon Sep 17 00:00:00 2001 From: somewho Date: Sat, 15 Jul 2023 19:55:52 +0300 Subject: [PATCH] fix reset_confirmation in reset.yml * skip reset_confirmation promtp when reset_confirmation is defined via extra-vars option (for tests) * check both string type and object type with user_input for reset_confirmation var --- playbooks/reset.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/playbooks/reset.yml b/playbooks/reset.yml index b4872559832..1c4a18b8009 100644 --- a/playbooks/reset.yml +++ b/playbooks/reset.yml @@ -25,10 +25,11 @@ run_once: True when: - not (skip_confirmation | default(false) | bool) + - reset_confirmation is not defined - name: Check confirmation fail: msg: "Reset confirmation failed" - when: (reset_confirmation.user_input | default('')) != "yes" + when: ((reset_confirmation.user_input | default(reset_confirmation)) | default('no')) != "yes" - name: Gather information about installed services service_facts: