Skip to content

Commit 29df9b5

Browse files
authored
fix: ci and lint (#208)
Signed-off-by: Tadas Sutkaitis <[email protected]>
1 parent 1c27827 commit 29df9b5

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

roles/kube_vip/tasks/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
- name: Uninstall legacy HA stack
1717
when:
1818
- kube_vip_enabled | bool
19-
- kube_vip_skip_ha_cleanup | bool == false
19+
- not (kube_vip_skip_ha_cleanup | bool)
2020
ansible.builtin.file:
2121
path: "{{ item }}"
2222
state: absent
@@ -31,7 +31,7 @@
3131

3232
- name: Switch API server to run on port 6443
3333
when: kube_vip_enabled
34-
ignore_errors: true
34+
ignore_errors: true # noqa ignore-errors
3535
ansible.builtin.replace:
3636
path: "{{ item }}"
3737
regexp: "16443"

roles/kubernetes/tasks/control-plane.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
when: >
3131
(ansible_facts['distribution'] == 'Ubuntu' and ansible_facts['distribution_major_version'] is version('22', '<=')) or
3232
(ansible_facts['distribution'] == 'Debian' and ansible_facts['distribution_major_version'] is version('12', '<=')) or
33-
(ansible_facts['distribution'] in ['RedHat', 'Rocky'] and ansible_facts['distribution_major_version'] is version('9', '<='))
33+
(ansible_facts['distribution'] in ['AlmaLinux', 'RedHat', 'Rocky'] and ansible_facts['distribution_major_version'] is version('8', '<='))
3434
block:
3535
# TODO(fitbeard): Move common system packages from all roles to dedicated role.
3636
- name: Install PIP
@@ -44,12 +44,19 @@
4444
name: kubernetes
4545

4646
- name: Install Kubernetes Python package using package manager
47-
ansible.builtin.package:
48-
name: python3-kubernetes
4947
when: >
5048
(ansible_facts['distribution'] == 'Ubuntu' and ansible_facts['distribution_major_version'] is version('22', '>')) or
5149
(ansible_facts['distribution'] == 'Debian' and ansible_facts['distribution_major_version'] is version('12', '>')) or
52-
(ansible_facts['distribution'] in ['RedHat', 'Rocky'] and ansible_facts['distribution_major_version'] is version('9', '>'))
50+
(ansible_facts['distribution'] in ['AlmaLinux', 'RedHat', 'Rocky'] and ansible_facts['distribution_major_version'] is version('8', '>'))
51+
block:
52+
- name: Enable EPEL repository
53+
ansible.builtin.package:
54+
name: epel-release
55+
when: ansible_facts['os_family'] == "RedHat"
56+
57+
- name: Install Kubernetes Python package using package manager on supported systems
58+
ansible.builtin.package:
59+
name: python3-kubernetes
5360

5461
- name: Allow workload on control plane node
5562
kubernetes.core.k8s_taint:

0 commit comments

Comments
 (0)