Skip to content

Commit

Permalink
Add iproute(2) package checking (#11816)
Browse files Browse the repository at this point in the history
Signed-off-by: ekko <[email protected]>
  • Loading branch information
0ekk authored Dec 19, 2024
1 parent 180ce0b commit bf70335
Show file tree
Hide file tree
Showing 7 changed files with 78 additions and 0 deletions.
11 changes: 11 additions & 0 deletions roles/bootstrap-os/tasks/amzn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,14 @@
enabled: true
repo_gpgcheck: false
when: epel_enabled

# iproute is required for networking related facts gathering
# See https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_vars_facts.html#package-requirements-for-fact-gathering
# Note: It is not recommended way, but since the tasks execution order, put it here is the simplest way so far. We can move it to a proper place later.
# TODO: move this to roles/kubernetes/preinstall/vars/main.yml -> pkgs variables
# Currently not possible because the collect the network facts before that step, needs reordering of the exec flow.
- name: Ensure iproute is installed
package:
name: iproute
state: present
become: true
11 changes: 11 additions & 0 deletions roles/bootstrap-os/tasks/centos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,14 @@
name: "{{ ((ansible_distribution_major_version | int) < 8) | ternary('libselinux-python', 'python3-libselinux') }}"
state: present
become: true

# iproute is required for networking related facts gathering
# See https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_vars_facts.html#package-requirements-for-fact-gathering
# Note: It is not recommended way, but since the tasks execution order, put it here is the simplest way so far. We can move it to a proper place later.
# TODO: move this to roles/kubernetes/preinstall/vars/main.yml -> pkgs variables
# Currently not possible because the collect the network facts before that step, needs reordering of the exec flow.
- name: Ensure iproute is installed
package:
name: iproute
state: present
become: true
11 changes: 11 additions & 0 deletions roles/bootstrap-os/tasks/clear-linux-os.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,14 @@
daemon_reload: true
state: started
become: true

# iproute2 is required for networking related facts gathering
# See https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_vars_facts.html#package-requirements-for-fact-gathering
# Note: It is not recommended way, but since the tasks execution order, put it here is the simplest way so far. We can move it to a proper place later.
# TODO: move this to roles/kubernetes/preinstall/vars/main.yml -> pkgs variables
# Currently not possible because the collect the network facts before that step, needs reordering of the exec flow.
- name: Ensure iproute2 is installed
package:
name: iproute2
state: present
become: true
11 changes: 11 additions & 0 deletions roles/bootstrap-os/tasks/debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,14 @@
- '"changed its" in bootstrap_update_apt_result.stdout'
- '"value from" in bootstrap_update_apt_result.stdout'
ignore_errors: true

# iproute2 is required for networking related facts gathering
# See https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_vars_facts.html#package-requirements-for-fact-gathering
# Note: It is not recommended way, but since the tasks execution order, put it here is the simplest way so far. We can move it to a proper place later.
# TODO: move this to roles/kubernetes/preinstall/vars/main.yml -> pkgs variables
# Currently not possible because the collect the network facts before that step, needs reordering of the exec flow.
- name: Ensure iproute2 is installed
package:
name: iproute2
state: present
become: true
11 changes: 11 additions & 0 deletions roles/bootstrap-os/tasks/fedora.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,14 @@
become: true
when:
- need_bootstrap.rc != 0

# iproute is required for networking related facts gathering
# See https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_vars_facts.html#package-requirements-for-fact-gathering
# Note: It is not recommended way, but since the tasks execution order, put it here is the simplest way so far. We can move it to a proper place later.
# TODO: move this to roles/kubernetes/preinstall/vars/main.yml -> pkgs variables
# Currently not possible because the collect the network facts before that step, needs reordering of the exec flow.
- name: Ensure iproute is installed
package:
name: iproute
state: present
become: true
12 changes: 12 additions & 0 deletions roles/bootstrap-os/tasks/opensuse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,15 @@
- apparmor-parser
state: present
become: true

# iproute2 is required for networking related facts gathering
# See https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_vars_facts.html#package-requirements-for-fact-gathering
# Note: It is not recommended way, but since the tasks execution order, put it here is the simplest way so far. We can move it to a proper place later.
# TODO: move this to roles/kubernetes/preinstall/vars/main.yml -> pkgs variables
# Currently not possible because the collect the network facts before that step, needs reordering of the exec flow.
- name: Ensure iproute2 is installed
community.general.zypper:
name: iproute2
state: present
update_cache: true
become: true
11 changes: 11 additions & 0 deletions roles/bootstrap-os/tasks/rhel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,14 @@
name: "{{ ((ansible_distribution_major_version | int) < 8) | ternary('libselinux-python', 'python3-libselinux') }}"
state: present
become: true

# iproute is required for networking related facts gathering
# See https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_vars_facts.html#package-requirements-for-fact-gathering
# Note: It is not recommended way, but since the tasks execution order, put it here is the simplest way so far. We can move it to a proper place later.
# TODO: move this to roles/kubernetes/preinstall/vars/main.yml -> pkgs variables
# Currently not possible because the collect the network facts before that step, needs reordering of the exec flow.
- name: Ensure iproute is installed
package:
name: iproute
state: present
become: true

0 comments on commit bf70335

Please sign in to comment.