Skip to content

Commit

Permalink
reset_confirmation in reset.yml (kubernetes-sigs#10288)
Browse files Browse the repository at this point in the history
* Update reset.yml

reset confirmation user input fix

* Update reset.yml

added default for non-interactive run in ci/cd

* 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

* reset_confirmation_prompt in conjunction with reset_confirmation

improvement inspired by:
kubernetes-sigs#10288 (comment)
  • Loading branch information
somewho authored and pedromcpedro committed May 8, 2024
1 parent 2a84137 commit afd2fbd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion playbooks/reset.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,13 @@
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 != "yes"
when:
- not reset_confirmation | default(false) | bool
- not reset_confirmation_prompt.user_input | default("") == "yes"

- name: Gather information about installed services
service_facts:
Expand Down

0 comments on commit afd2fbd

Please sign in to comment.