From eddc08ddbb19b8006bf52fd40ab73fb60cc5d4a9 Mon Sep 17 00:00:00 2001 From: Brad Cowie Date: Mon, 29 Jan 2024 11:53:43 +1300 Subject: [PATCH] Make yes/no handling consistent with other roles. --- tasks/check-git-repo.yml | 4 ++-- tasks/check-hostname.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tasks/check-git-repo.yml b/tasks/check-git-repo.yml index b03685e..678a422 100644 --- a/tasks/check-git-repo.yml +++ b/tasks/check-git-repo.yml @@ -46,7 +46,7 @@ ansible.builtin.pause: prompt: >- One or more git repo sanity checks failed, - do you wish to continue with the play? (y/n) + do you wish to continue with the play? (yes/no) register: _sanity_check_git_repo_continue when: _sanity_check_git_branch.changed or _sanity_check_dirty_git_tree.changed @@ -54,7 +54,7 @@ ansible.builtin.assert: that: >- _sanity_check_git_repo_continue.user_input | bool - or _sanity_check_git_repo_continue.user_input == "y" + or _sanity_check_git_repo_continue.user_input | lower == "y" fail_msg: >- User response "{{ _sanity_check_git_repo_continue.user_input }}" is not "yes" success_msg: "Git repo sanity check overriden" diff --git a/tasks/check-hostname.yml b/tasks/check-hostname.yml index 380a715..31bd4ed 100644 --- a/tasks/check-hostname.yml +++ b/tasks/check-hostname.yml @@ -21,7 +21,7 @@ ansible.builtin.pause: prompt: >- The current hostname on the machine does not match the hostname in the ansible inventory, - do you wish to continue with the play? (y/n) + do you wish to continue with the play? (yes/no) register: _sanity_check_hostname_continue when: _sanity_check_hostname.changed @@ -29,7 +29,7 @@ ansible.builtin.assert: that: >- _sanity_check_hostname_continue.user_input | bool - or _sanity_check_hostname_continue.user_input == "y" + or _sanity_check_hostname_continue.user_input | lower == "y" fail_msg: >- User response "{{ _sanity_check_hostname_continue.user_input }}" is not "yes" success_msg: "Hostname sanity check overriden"