Skip to content

Commit

Permalink
fix: Swap kubespray-defaults & boostrap-os (kubernetes-sigs#11441)
Browse files Browse the repository at this point in the history
- Execute boostrap-os before so that Python is installed for kubespray-defaults
- Remove outdated kubespray-defaults dependency on boostrap-os
  • Loading branch information
huangkevin404 authored Sep 12, 2024
1 parent 5ae433b commit c601c8f
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 10 deletions.
4 changes: 0 additions & 4 deletions docs/operating_systems/bootstrap-os.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@ Variables are listed with their default values, if applicable.
* `centos_fastestmirror_enabled: false`
Whether the [fastestmirror](https://wiki.centos.org/PackageManagement/Yum/FastestMirror) yum plugin should be enabled.

## Dependencies

The `kubespray-defaults` role is expected to be run before this role.

## Example Playbook

Remember to disable fact gathering since Python might not be present on hosts.
Expand Down
2 changes: 1 addition & 1 deletion playbooks/facts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
# fail. bootstrap-os fixes this on these systems, so in later plays it can be enabled.
ansible_ssh_pipelining: false
roles:
- { role: kubespray-defaults }
- { role: bootstrap-os, tags: bootstrap-os}
- { role: kubespray-defaults }

- name: Gather facts
hosts: k8s_cluster:etcd:calico_rr
Expand Down
5 changes: 0 additions & 5 deletions roles/kubespray-defaults/tasks/main.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
---
- name: Set facts variables
# do not run gather facts when bootstrap-os in roles
when: >
ansible_play_role_names |
intersect(['bootstrap-os', 'kubernetes_sigs.kubespray.bootstrap-os']) |
length == 0
tags:
- always
block:
Expand Down

0 comments on commit c601c8f

Please sign in to comment.