From abb20e728ba894b973e399aeb5dc025aa97f7b49 Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Fri, 2 Oct 2020 18:18:52 +0300 Subject: [PATCH] Remove "when" statement from vars_prompt In ansible 2.10 when statement is not supported for vars_prompt. Also default behaviour will not ask for vars_prompt in case var is passed with -e or in non-interactive shell [1] [1] https://docs.ansible.com/ansible/latest/user_guide/playbooks_prompts.html Change-Id: I1fcb7d195139b82edfa17eba43a4ef9b6256297f --- playbooks/containers-lxc-destroy.yml | 2 -- playbooks/containers-nspawn-destroy.yml | 2 -- 2 files changed, 4 deletions(-) diff --git a/playbooks/containers-lxc-destroy.yml b/playbooks/containers-lxc-destroy.yml index c4d6668a3f..7b4a4aa6a4 100644 --- a/playbooks/containers-lxc-destroy.yml +++ b/playbooks/containers-lxc-destroy.yml @@ -81,11 +81,9 @@ prompt: "Are you sure you want to destroy the LXC containers?" default: "no" private: no - when: force_containers_destroy is undefined - name: "force_containers_data_destroy" prompt: "Are you sure you want to destroy the LXC container data?" default: "no" private: no - when: force_containers_data_destroy is undefined tags: - lxc-containers-destroy diff --git a/playbooks/containers-nspawn-destroy.yml b/playbooks/containers-nspawn-destroy.yml index 05aa79e614..70a7ddf58a 100644 --- a/playbooks/containers-nspawn-destroy.yml +++ b/playbooks/containers-nspawn-destroy.yml @@ -102,11 +102,9 @@ prompt: "Are you sure you want to destroy the nspawn containers?" default: "no" private: no - when: force_containers_destroy is undefined - name: "force_containers_data_destroy" prompt: "Are you sure you want to destroy the nspawn container data?" default: "no" private: no - when: force_containers_data_destroy is undefined tags: - nspawn-containers-destroy