File tree Expand file tree Collapse file tree 2 files changed +7
-9
lines changed Expand file tree Collapse file tree 2 files changed +7
-9
lines changed Original file line number Diff line number Diff line change 10
10
- jo_image_tag != 'SetMe'
11
11
12
12
- name : Deploy (with k8s kubeconfig)
13
+ when : jo_kubeconfig != 'SetMe'
14
+ module_defaults :
15
+ group/k8s :
16
+ kubeconfig : " {{ jo_kubeconfig }}"
13
17
block :
14
18
15
19
- name : Deploy (k8s kubeconfig)
19
23
ansible.builtin.include_tasks : undeploy.yaml
20
24
when : jo_state|string == 'absent'
21
25
22
- module_defaults :
23
- group/k8s :
24
- kubeconfig : " {{ jo_kubeconfig }}"
25
- when : jo_kubeconfig != 'SetMe'
26
-
27
26
- name : Deploy (with k8s host and API key)
27
+ when : jo_kubeconfig == 'SetMe'
28
28
block :
29
29
30
30
- name : Deploy (k8s API key)
33
33
- name : Undeploy (k8s API key)
34
34
ansible.builtin.include_tasks : undeploy.yaml
35
35
when : jo_state|string == 'absent'
36
-
37
- when : jo_kubeconfig == 'SetMe'
Original file line number Diff line number Diff line change 25
25
# expected environment variables so that we can assert they've been set.
26
26
27
27
- name : Set initial authentication facts
28
- set_fact :
28
+ ansible.builtin. set_fact :
29
29
k8s_auth_host : " {{ lookup('env', 'K8S_AUTH_HOST') }}"
30
30
k8s_auth_api_key : " {{ lookup('env', 'K8S_AUTH_API_KEY') }}"
31
31
35
35
# Either way the variables 'k8s_auth_host' and
36
36
# 'k8s_auth_api_key' must have been set.
37
37
- name : Assert kubernetes authentication (no kubeconfig)
38
- assert :
38
+ ansible.builtin. assert :
39
39
that :
40
40
- k8s_auth_host|string|length > 0
41
41
- k8s_auth_api_key|string|length > 0
You can’t perform that action at this time.
0 commit comments