We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e4deac6 commit f7efa6cCopy full SHA for f7efa6c
environments/site/hooks/pre.yml
@@ -0,0 +1,20 @@
1
+---
2
+
3
+- hosts: localhost
4
+ gather_facts: no
5
+ become: no
6
+ tasks:
7
+ - name: Confirm continuing if using production environment
8
+ ansible.builtin.pause:
9
+ prompt: |
10
+ *************************************
11
+ * WARNING: PROTECTED ENVIRONMENT! *
12
13
14
+ Current environment: {{ appliances_environment_name }}
15
+ Do you really want to continue (yes/no)?
16
+ register: env_confirm_safe
17
+ when:
18
+ - appliances_environment_name in protected_environments
19
+ - not (prd_continue | default(false) | bool)
20
+ failed_when: not (env_confirm_safe.user_input | bool)
0 commit comments