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
- adduser
- bastion-ssh-config
- bootstrap-os
- bootstrap_os
molecule_full:
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 |
| azure-csi-driver | Configuring csi driver: azure |
| 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_rr | Configuring Calico route reflector |
| 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:
```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:

View File

@@ -1,4 +1,4 @@
# bootstrap-os
# bootstrap_os
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
roles:
- kubespray_defaults
- bootstrap-os
- bootstrap_os
```
## License

View File

@@ -22,12 +22,12 @@
any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
gather_facts: false
vars:
# 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.
# 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.
ansible_ssh_pipelining: false
roles:
- { role: kubespray_defaults}
- { role: bootstrap-os, tags: bootstrap-os}
- { role: bootstrap_os, tags: bootstrap_os}
- name: Preinstall
hosts: k8s_cluster:etcd:calico_rr

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -32,7 +32,7 @@
- systemd_resolved_enabled.rc != 0
- networkmanager_enabled.rc != 0
tags:
- bootstrap-os
- bootstrap_os
- resolvconf
- name: Apply systemd-resolved settings
@@ -42,7 +42,7 @@
- resolvconf_mode == 'host_resolvconf'
- systemd_resolved_enabled.rc == 0
tags:
- bootstrap-os
- bootstrap_os
- resolvconf
- name: Apply networkmanager unmanaged devices settings
@@ -50,7 +50,7 @@
when:
- networkmanager_enabled.rc == 0
tags:
- bootstrap-os
- bootstrap_os
- name: Apply networkmanager DNS settings
import_tasks: 0063-networkmanager-dns.yml
@@ -59,7 +59,7 @@
- resolvconf_mode == 'host_resolvconf'
- networkmanager_enabled.rc == 0
tags:
- bootstrap-os
- bootstrap_os
- resolvconf
- name: Apply system configurations
@@ -67,7 +67,7 @@
when:
- not dns_late
tags:
- bootstrap-os
- bootstrap_os
- name: Configure NTP
import_tasks: 0081-ntp-configurations.yml
@@ -75,12 +75,12 @@
- not dns_late
- ntp_enabled
tags:
- bootstrap-os
- bootstrap_os
- name: Configure /etc/hosts
import_tasks: 0090-etchosts.yml
tags:
- bootstrap-os
- bootstrap_os
- etchosts
- name: Configure dhclient
@@ -91,7 +91,7 @@
- dhclientconffile is defined
- not ansible_os_family in ["Flatcar", "Flatcar Container Linux by Kinvolk"]
tags:
- bootstrap-os
- bootstrap_os
- resolvconf
- name: Configure dhclient dhclient hooks
@@ -102,7 +102,7 @@
- dhclientconffile is defined
- not ansible_os_family in ["Flatcar", "Flatcar Container Linux by Kinvolk"]
tags:
- bootstrap-os
- bootstrap_os
- resolvconf
# 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:
- not dns_late
tags:
- bootstrap-os
- bootstrap_os
- name: Run calico checks
include_role:

View File

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