Skip to content
Snippets Groups Projects
Unverified Commit c601c8fa authored by Kevin Huang's avatar Kevin Huang Committed by GitHub
Browse files

fix: Swap kubespray-defaults & boostrap-os (#11441)

- Execute boostrap-os before so that Python is installed for kubespray-defaults
- Remove outdated kubespray-defaults dependency on boostrap-os
parent 5ae433bf
Branches
Tags
No related merge requests found
...@@ -40,10 +40,6 @@ Variables are listed with their default values, if applicable. ...@@ -40,10 +40,6 @@ Variables are listed with their default values, if applicable.
* `centos_fastestmirror_enabled: false` * `centos_fastestmirror_enabled: false`
Whether the [fastestmirror](https://wiki.centos.org/PackageManagement/Yum/FastestMirror) yum plugin should be enabled. 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 ## Example Playbook
Remember to disable fact gathering since Python might not be present on hosts. Remember to disable fact gathering since Python might not be present on hosts.
......
...@@ -10,8 +10,8 @@ ...@@ -10,8 +10,8 @@
# fail. bootstrap-os fixes this on these systems, so in later plays it can be enabled. # fail. bootstrap-os fixes this on these systems, so in later plays it can be enabled.
ansible_ssh_pipelining: false ansible_ssh_pipelining: false
roles: roles:
- { role: kubespray-defaults }
- { role: bootstrap-os, tags: bootstrap-os} - { role: bootstrap-os, tags: bootstrap-os}
- { role: kubespray-defaults }
- name: Gather facts - name: Gather facts
hosts: k8s_cluster:etcd:calico_rr hosts: k8s_cluster:etcd:calico_rr
......
--- ---
- name: Set facts variables - 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: tags:
- always - always
block: block:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment