Rename bootstrap-os to bootstrap_os

Role names in ansible collections should not have hyphens.
This commit is contained in:
Max Gautier
2025-05-10 10:09:43 +02:00
parent fa6888df4c
commit 47508d5c6e
38 changed files with 39 additions and 39 deletions

View File

@@ -37,7 +37,7 @@ molecule:
- container-engine/cri-o - container-engine/cri-o
- adduser - adduser
- bastion-ssh-config - bastion-ssh-config
- bootstrap-os - bootstrap_os
molecule_full: molecule_full:
allow_failure: true allow_failure: true

View File

@@ -62,7 +62,7 @@ The following tags are defined in playbooks:
| aws-ebs-csi-driver | Configuring csi driver: aws-ebs | | aws-ebs-csi-driver | Configuring csi driver: aws-ebs |
| azure-csi-driver | Configuring csi driver: azure | | azure-csi-driver | Configuring csi driver: azure |
| bastion | Setup ssh config for bastion | | bastion | Setup ssh config for bastion |
| bootstrap-os | Anything related to host OS configuration | | bootstrap_os | Anything related to host OS configuration |
| calico | Network plugin Calico | | calico | Network plugin Calico |
| calico_rr | Configuring Calico route reflector | | calico_rr | Configuring Calico route reflector |
| cert-manager | Configuring certificate manager for K8s | | cert-manager | Configuring certificate manager for K8s |
@@ -167,7 +167,7 @@ Example command to filter and apply only DNS configuration tasks and skip
everything else related to host OS configuration and downloading images of containers: everything else related to host OS configuration and downloading images of containers:
```ShellSession ```ShellSession
ansible-playbook -i inventory/sample/hosts.ini cluster.yml --tags preinstall,facts --skip-tags=download,bootstrap-os ansible-playbook -i inventory/sample/hosts.ini cluster.yml --tags preinstall,facts --skip-tags=download,bootstrap_os
``` ```
And this play only removes the K8s cluster DNS resolver IP from hosts' /etc/resolv.conf files: And this play only removes the K8s cluster DNS resolver IP from hosts' /etc/resolv.conf files:

View File

@@ -1,4 +1,4 @@
# bootstrap-os # bootstrap_os
Bootstrap an Ansible host to be able to run Ansible modules. Bootstrap an Ansible host to be able to run Ansible modules.
@@ -49,7 +49,7 @@ Remember to disable fact gathering since Python might not be present on hosts.
gather_facts: false # not all hosts might be able to run modules yet gather_facts: false # not all hosts might be able to run modules yet
roles: roles:
- kubespray_defaults - kubespray_defaults
- bootstrap-os - bootstrap_os
``` ```
## License ## License

View File

@@ -22,12 +22,12 @@
any_errors_fatal: "{{ any_errors_fatal | default(true) }}" any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
gather_facts: false gather_facts: false
vars: vars:
# Need to disable pipelining for bootstrap-os as some systems have requiretty in sudoers set, which makes pipelining # Need to disable pipelining for bootstrap_os as some systems have requiretty in sudoers set, which makes pipelining
# 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: kubespray_defaults}
- { role: bootstrap-os, tags: bootstrap-os} - { role: bootstrap_os, tags: bootstrap_os}
- name: Preinstall - name: Preinstall
hosts: k8s_cluster:etcd:calico_rr hosts: k8s_cluster:etcd:calico_rr

View File

@@ -6,7 +6,7 @@
gather_facts: false gather_facts: false
environment: "{{ proxy_disable_env }}" environment: "{{ proxy_disable_env }}"
roles: roles:
- { role: bootstrap-os, tags: bootstrap-os} - { role: bootstrap_os, tags: bootstrap_os}
- name: Gather facts - name: Gather facts
hosts: k8s_cluster:etcd:calico_rr hosts: k8s_cluster:etcd:calico_rr

View File

@@ -4,4 +4,4 @@
gather_facts: false gather_facts: false
become: true become: true
roles: roles:
- role: bootstrap-os - role: bootstrap_os

View File

@@ -7,7 +7,7 @@
ignore_assert_errors: true ignore_assert_errors: true
roles: roles:
- role: kubespray_defaults - role: kubespray_defaults
- role: bootstrap-os - role: bootstrap_os
- role: network_facts - role: network_facts
- role: kubernetes/preinstall - role: kubernetes/preinstall
- role: adduser - role: adduser

View File

@@ -4,7 +4,7 @@
become: true become: true
roles: roles:
- role: kubespray_defaults - role: kubespray_defaults
- role: bootstrap-os - role: bootstrap_os
- role: adduser - role: adduser
user: "{{ addusers.kube }}" user: "{{ addusers.kube }}"
tasks: tasks:

View File

@@ -7,7 +7,7 @@
ignore_assert_errors: true ignore_assert_errors: true
roles: roles:
- role: kubespray_defaults - role: kubespray_defaults
- role: bootstrap-os - role: bootstrap_os
- role: network_facts - role: network_facts
- role: kubernetes/preinstall - role: kubernetes/preinstall
- role: adduser - role: adduser

View File

@@ -4,7 +4,7 @@
become: true become: true
roles: roles:
- role: kubespray_defaults - role: kubespray_defaults
- role: bootstrap-os - role: bootstrap_os
- role: adduser - role: adduser
user: "{{ addusers.kube }}" user: "{{ addusers.kube }}"
tasks: tasks:

View File

@@ -4,7 +4,7 @@
become: true become: true
roles: roles:
- role: kubespray_defaults - role: kubespray_defaults
- role: bootstrap-os - role: bootstrap_os
- role: adduser - role: adduser
user: "{{ addusers.kube }}" user: "{{ addusers.kube }}"
tasks: tasks:

View File

@@ -4,7 +4,7 @@
become: true become: true
roles: roles:
- role: kubespray_defaults - role: kubespray_defaults
- role: bootstrap-os - role: bootstrap_os
- role: adduser - role: adduser
user: "{{ addusers.kube }}" user: "{{ addusers.kube }}"
tasks: tasks:

View File

@@ -11,7 +11,7 @@
- kubelet - kubelet
- kube-controller-manager - kube-controller-manager
- kube-apiserver - kube-apiserver
- bootstrap-os - bootstrap_os
- apps - apps
- network - network
- master # master tag is deprecated and replaced by control-plane - master # master tag is deprecated and replaced by control-plane
@@ -35,7 +35,7 @@
- kubelet - kubelet
- kube-controller-manager - kube-controller-manager
- kube-apiserver - kube-apiserver
- bootstrap-os - bootstrap_os
- apps - apps
- network - network
- master # master tag is deprecated and replaced by control-plane - master # master tag is deprecated and replaced by control-plane
@@ -86,7 +86,7 @@
- weave - weave
- kube-ovn - kube-ovn
- kube-router - kube-router
- bootstrap-os - bootstrap_os
- name: Create calico cni directories - name: Create calico cni directories
file: file:
@@ -102,7 +102,7 @@
tags: tags:
- network - network
- calico - calico
- bootstrap-os - bootstrap_os
- name: Create local volume provisioner directories - name: Create local volume provisioner directories
file: file:

View File

@@ -20,7 +20,7 @@
- "'Amazon' not in ansible_distribution" - "'Amazon' not in ansible_distribution"
- slc.stat.exists - slc.stat.exists
tags: tags:
- bootstrap-os - bootstrap_os
- name: Disable IPv6 DNS lookup - name: Disable IPv6 DNS lookup
lineinfile: lineinfile:
@@ -34,7 +34,7 @@
- disable_ipv6_dns - disable_ipv6_dns
- not ansible_os_family in ["Flatcar", "Flatcar Container Linux by Kinvolk"] - not ansible_os_family in ["Flatcar", "Flatcar Container Linux by Kinvolk"]
tags: tags:
- bootstrap-os - bootstrap_os
- name: Clean previously used sysctl file locations - name: Clean previously used sysctl file locations
file: file:
@@ -52,7 +52,7 @@
get_mime: false get_mime: false
register: sysctl_file_stat register: sysctl_file_stat
tags: tags:
- bootstrap-os - bootstrap_os
- name: Change sysctl file path to link source if linked - name: Change sysctl file path to link source if linked
set_fact: set_fact:
@@ -61,7 +61,7 @@
- sysctl_file_stat.stat.islnk is defined - sysctl_file_stat.stat.islnk is defined
- sysctl_file_stat.stat.islnk - sysctl_file_stat.stat.islnk
tags: tags:
- bootstrap-os - bootstrap_os
- name: Make sure sysctl file path folder exists - name: Make sure sysctl file path folder exists
file: file:

View File

@@ -32,7 +32,7 @@
- systemd_resolved_enabled.rc != 0 - systemd_resolved_enabled.rc != 0
- networkmanager_enabled.rc != 0 - networkmanager_enabled.rc != 0
tags: tags:
- bootstrap-os - bootstrap_os
- resolvconf - resolvconf
- name: Apply systemd-resolved settings - name: Apply systemd-resolved settings
@@ -42,7 +42,7 @@
- resolvconf_mode == 'host_resolvconf' - resolvconf_mode == 'host_resolvconf'
- systemd_resolved_enabled.rc == 0 - systemd_resolved_enabled.rc == 0
tags: tags:
- bootstrap-os - bootstrap_os
- resolvconf - resolvconf
- name: Apply networkmanager unmanaged devices settings - name: Apply networkmanager unmanaged devices settings
@@ -50,7 +50,7 @@
when: when:
- networkmanager_enabled.rc == 0 - networkmanager_enabled.rc == 0
tags: tags:
- bootstrap-os - bootstrap_os
- name: Apply networkmanager DNS settings - name: Apply networkmanager DNS settings
import_tasks: 0063-networkmanager-dns.yml import_tasks: 0063-networkmanager-dns.yml
@@ -59,7 +59,7 @@
- resolvconf_mode == 'host_resolvconf' - resolvconf_mode == 'host_resolvconf'
- networkmanager_enabled.rc == 0 - networkmanager_enabled.rc == 0
tags: tags:
- bootstrap-os - bootstrap_os
- resolvconf - resolvconf
- name: Apply system configurations - name: Apply system configurations
@@ -67,7 +67,7 @@
when: when:
- not dns_late - not dns_late
tags: tags:
- bootstrap-os - bootstrap_os
- name: Configure NTP - name: Configure NTP
import_tasks: 0081-ntp-configurations.yml import_tasks: 0081-ntp-configurations.yml
@@ -75,12 +75,12 @@
- not dns_late - not dns_late
- ntp_enabled - ntp_enabled
tags: tags:
- bootstrap-os - bootstrap_os
- name: Configure /etc/hosts - name: Configure /etc/hosts
import_tasks: 0090-etchosts.yml import_tasks: 0090-etchosts.yml
tags: tags:
- bootstrap-os - bootstrap_os
- etchosts - etchosts
- name: Configure dhclient - name: Configure dhclient
@@ -91,7 +91,7 @@
- dhclientconffile is defined - dhclientconffile is defined
- not ansible_os_family in ["Flatcar", "Flatcar Container Linux by Kinvolk"] - not ansible_os_family in ["Flatcar", "Flatcar Container Linux by Kinvolk"]
tags: tags:
- bootstrap-os - bootstrap_os
- resolvconf - resolvconf
- name: Configure dhclient dhclient hooks - name: Configure dhclient dhclient hooks
@@ -102,7 +102,7 @@
- dhclientconffile is defined - dhclientconffile is defined
- not ansible_os_family in ["Flatcar", "Flatcar Container Linux by Kinvolk"] - not ansible_os_family in ["Flatcar", "Flatcar Container Linux by Kinvolk"]
tags: tags:
- bootstrap-os - bootstrap_os
- resolvconf - resolvconf
# We need to make sure the network is restarted early enough so that docker can later pick up the correct system # We need to make sure the network is restarted early enough so that docker can later pick up the correct system
@@ -120,7 +120,7 @@
when: when:
- not dns_late - not dns_late
tags: tags:
- bootstrap-os - bootstrap_os
- name: Run calico checks - name: Run calico checks
include_role: include_role:

View File

@@ -13,14 +13,14 @@
delay: "{{ retry_stagger | random + 3 }}" delay: "{{ retry_stagger | random + 3 }}"
when: when:
- ansible_pkg_mgr == 'zypper' - ansible_pkg_mgr == 'zypper'
tags: bootstrap-os tags: bootstrap_os
- name: Add debian 10 required repos - name: Add debian 10 required repos
when: when:
- ansible_distribution == "Debian" - ansible_distribution == "Debian"
- ansible_distribution_version == "10" - ansible_distribution_version == "10"
tags: tags:
- bootstrap-os - bootstrap_os
block: block:
- name: Add Debian Backports apt repo - name: Add Debian Backports apt repo
apt_repository: apt_repository:
@@ -44,7 +44,7 @@
cache_valid_time: 3600 cache_valid_time: 3600
when: ansible_os_family == "Debian" when: ansible_os_family == "Debian"
tags: tags:
- bootstrap-os - bootstrap_os
- name: Remove legacy docker repo file - name: Remove legacy docker repo file
file: file:
@@ -63,7 +63,7 @@
- not is_fedora_coreos - not is_fedora_coreos
- epel_enabled | bool - epel_enabled | bool
tags: tags:
- bootstrap-os - bootstrap_os
- name: Install packages requirements - name: Install packages requirements
package: package:
@@ -75,4 +75,4 @@
delay: "{{ retry_stagger | random + 3 }}" delay: "{{ retry_stagger | random + 3 }}"
when: not (ansible_os_family in ["Flatcar", "Flatcar Container Linux by Kinvolk"] or is_fedora_coreos) when: not (ansible_os_family in ["Flatcar", "Flatcar Container Linux by Kinvolk"] or is_fedora_coreos)
tags: tags:
- bootstrap-os - bootstrap_os