Skip to content

Commit

Permalink
style: Fix some lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Alan Christie committed Dec 20, 2024
1 parent 6809faf commit cfe368b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
12 changes: 5 additions & 7 deletions roles/operator/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
- jo_image_tag != 'SetMe'

- name: Deploy (with k8s kubeconfig)
when: jo_kubeconfig != 'SetMe'
module_defaults:
group/k8s:
kubeconfig: "{{ jo_kubeconfig }}"
block:

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

module_defaults:
group/k8s:
kubeconfig: "{{ jo_kubeconfig }}"
when: jo_kubeconfig != 'SetMe'

- name: Deploy (with k8s host and API key)
when: jo_kubeconfig == 'SetMe'
block:

- name: Deploy (k8s API key)
Expand All @@ -33,5 +33,3 @@
- name: Undeploy (k8s API key)
ansible.builtin.include_tasks: undeploy.yaml
when: jo_state|string == 'absent'

when: jo_kubeconfig == 'SetMe'
4 changes: 2 additions & 2 deletions roles/operator/tasks/prep.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
# expected environment variables so that we can assert they've been set.

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

Expand All @@ -35,7 +35,7 @@
# Either way the variables 'k8s_auth_host' and
# 'k8s_auth_api_key' must have been set.
- name: Assert kubernetes authentication (no kubeconfig)
assert:
ansible.builtin.assert:
that:
- k8s_auth_host|string|length > 0
- k8s_auth_api_key|string|length > 0
Expand Down

0 comments on commit cfe368b

Please sign in to comment.