Skip to content

Commit

Permalink
preinstall: Move ipvs packages into defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
VannTen committed Apr 29, 2024
1 parent 3d19e74 commit f91e00a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
1 change: 1 addition & 0 deletions roles/kubernetes/preinstall/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ common_required_pkgs:
- ebtables
- bash-completion
- tar
- "{{ kube_proxy_mode == 'ipvs' | ternary(['ipvsadm', 'ipset'], []) }}"

# Set to true if your network does not support IPv6
# This may be necessary for pulling Docker images from
Expand Down
7 changes: 1 addition & 6 deletions roles/kubernetes/preinstall/tasks/0070-system-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,9 @@
tags:
- bootstrap-os

- name: Update common_required_pkgs with ipvsadm when kube_proxy_mode is ipvs
set_fact:
common_required_pkgs: "{{ common_required_pkgs | default([]) + ['ipvsadm', 'ipset'] }}"
when: kube_proxy_mode == 'ipvs'

- name: Install packages requirements
package:
name: "{{ required_pkgs | default([]) | union(common_required_pkgs | default([])) }}"
name: "{{ required_pkgs | union(common_required_pkgs) | flatten }}"
state: present
register: pkgs_task_result
until: pkgs_task_result is succeeded
Expand Down

0 comments on commit f91e00a

Please sign in to comment.