File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44 ansible.builtin.include_tasks : prep.yaml
55
66- name : Deploy (with k8s kubeconfig)
7+ when : jo_kubeconfig != 'SetMe'
8+ module_defaults :
9+ group/k8s :
10+ kubeconfig : " {{ jo_kubeconfig }}"
711 block :
812
913 - name : Deploy (k8s kubeconfig)
1317 ansible.builtin.include_tasks : undeploy.yaml
1418 when : jo_state|string == 'absent'
1519
16- module_defaults :
17- group/k8s :
18- kubeconfig : " {{ jo_kubeconfig }}"
19- when : jo_kubeconfig != 'SetMe'
20-
2120- name : Deploy (with k8s host and API key)
21+ when : jo_kubeconfig == 'SetMe'
2222 block :
2323
2424 - name : Deploy (k8s API key)
2727 - name : Undeploy (k8s API key)
2828 ansible.builtin.include_tasks : undeploy.yaml
2929 when : jo_state|string == 'absent'
30-
31- when : jo_kubeconfig == 'SetMe'
Original file line number Diff line number Diff line change 3131# expected environment variables so that we can assert they've been set.
3232
3333- name : Set initial authentication facts
34- set_fact :
34+ ansible.builtin. set_fact :
3535 k8s_auth_host : " {{ lookup('env', 'K8S_AUTH_HOST') }}"
3636 k8s_auth_api_key : " {{ lookup('env', 'K8S_AUTH_API_KEY') }}"
3737
4141# Either way the variables 'k8s_auth_host' and
4242# 'k8s_auth_api_key' must have been set.
4343- name : Assert kubernetes authentication (no kubeconfig)
44- assert :
44+ ansible.builtin. assert :
4545 that :
4646 - k8s_auth_host|string|length > 0
4747 - k8s_auth_api_key|string|length > 0
You can’t perform that action at this time.
0 commit comments