Skip to content

Commit cfe368b

Browse files
author
Alan Christie
committed
style: Fix some lint issues
1 parent 6809faf commit cfe368b

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

roles/operator/tasks/main.yaml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
- jo_image_tag != 'SetMe'
1111

1212
- name: Deploy (with k8s kubeconfig)
13+
when: jo_kubeconfig != 'SetMe'
14+
module_defaults:
15+
group/k8s:
16+
kubeconfig: "{{ jo_kubeconfig }}"
1317
block:
1418

1519
- name: Deploy (k8s kubeconfig)
@@ -19,12 +23,8 @@
1923
ansible.builtin.include_tasks: undeploy.yaml
2024
when: jo_state|string == 'absent'
2125

22-
module_defaults:
23-
group/k8s:
24-
kubeconfig: "{{ jo_kubeconfig }}"
25-
when: jo_kubeconfig != 'SetMe'
26-
2726
- name: Deploy (with k8s host and API key)
27+
when: jo_kubeconfig == 'SetMe'
2828
block:
2929

3030
- name: Deploy (k8s API key)
@@ -33,5 +33,3 @@
3333
- name: Undeploy (k8s API key)
3434
ansible.builtin.include_tasks: undeploy.yaml
3535
when: jo_state|string == 'absent'
36-
37-
when: jo_kubeconfig == 'SetMe'

roles/operator/tasks/prep.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
# expected environment variables so that we can assert they've been set.
2626

2727
- name: Set initial authentication facts
28-
set_fact:
28+
ansible.builtin.set_fact:
2929
k8s_auth_host: "{{ lookup('env', 'K8S_AUTH_HOST') }}"
3030
k8s_auth_api_key: "{{ lookup('env', 'K8S_AUTH_API_KEY') }}"
3131

@@ -35,7 +35,7 @@
3535
# Either way the variables 'k8s_auth_host' and
3636
# 'k8s_auth_api_key' must have been set.
3737
- name: Assert kubernetes authentication (no kubeconfig)
38-
assert:
38+
ansible.builtin.assert:
3939
that:
4040
- k8s_auth_host|string|length > 0
4141
- k8s_auth_api_key|string|length > 0

0 commit comments

Comments
 (0)