Browse Source

Rename bootstrap-os to bootstrap_os

Role names in ansible collections should not have hyphens.
pull/12203/head
Max Gautier 4 months ago
parent
commit
47508d5c6e
Failed to extract signature
38 changed files with 39 additions and 39 deletions
  1. 2
      .gitlab-ci/molecule.yml
  2. 4
      docs/ansible/ansible.md
  3. 4
      docs/operating_systems/bootstrap-os.md
  4. 6
      extra_playbooks/upgrade-only-k8s.yml
  5. 2
      playbooks/facts.yml
  6. 0
      roles/bootstrap_os/defaults/main.yml
  7. 0
      roles/bootstrap_os/files/bootstrap.sh
  8. 0
      roles/bootstrap_os/handlers/main.yml
  9. 0
      roles/bootstrap_os/meta/main.yml
  10. 2
      roles/bootstrap_os/molecule/default/converge.yml
  11. 0
      roles/bootstrap_os/molecule/default/molecule.yml
  12. 0
      roles/bootstrap_os/molecule/default/tests/test_default.py
  13. 0
      roles/bootstrap_os/tasks/amzn.yml
  14. 0
      roles/bootstrap_os/tasks/centos.yml
  15. 0
      roles/bootstrap_os/tasks/clear-linux-os.yml
  16. 0
      roles/bootstrap_os/tasks/debian.yml
  17. 0
      roles/bootstrap_os/tasks/fedora-coreos.yml
  18. 0
      roles/bootstrap_os/tasks/fedora.yml
  19. 0
      roles/bootstrap_os/tasks/flatcar.yml
  20. 0
      roles/bootstrap_os/tasks/main.yml
  21. 0
      roles/bootstrap_os/tasks/openEuler.yml
  22. 0
      roles/bootstrap_os/tasks/opensuse-leap.yml
  23. 0
      roles/bootstrap_os/tasks/opensuse-tumbleweed.yml
  24. 0
      roles/bootstrap_os/tasks/opensuse.yml
  25. 0
      roles/bootstrap_os/tasks/rhel.yml
  26. 0
      roles/bootstrap_os/tasks/ubuntu.yml
  27. 0
      roles/bootstrap_os/vars/fedora-coreos.yml
  28. 0
      roles/bootstrap_os/vars/flatcar.yml
  29. 2
      roles/container-engine/containerd/molecule/default/prepare.yml
  30. 2
      roles/container-engine/cri-dockerd/molecule/default/prepare.yml
  31. 2
      roles/container-engine/cri-o/molecule/default/prepare.yml
  32. 2
      roles/container-engine/gvisor/molecule/default/prepare.yml
  33. 2
      roles/container-engine/kata-containers/molecule/default/prepare.yml
  34. 2
      roles/container-engine/youki/molecule/default/prepare.yml
  35. 8
      roles/kubernetes/preinstall/tasks/0050-create_directories.yml
  36. 8
      roles/kubernetes/preinstall/tasks/0080-system-configurations.yml
  37. 20
      roles/kubernetes/preinstall/tasks/main.yml
  38. 10
      roles/system_packages/tasks/main.yml

2
.gitlab-ci/molecule.yml

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

4
docs/ansible/ansible.md

@ -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:

4
docs/operating_systems/bootstrap-os.md

@ -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

6
extra_playbooks/upgrade-only-k8s.yml

@ -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

2
playbooks/facts.yml

@ -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

roles/bootstrap-os/defaults/main.yml → roles/bootstrap_os/defaults/main.yml

roles/bootstrap-os/files/bootstrap.sh → roles/bootstrap_os/files/bootstrap.sh

roles/bootstrap-os/handlers/main.yml → roles/bootstrap_os/handlers/main.yml

roles/bootstrap-os/meta/main.yml → roles/bootstrap_os/meta/main.yml

roles/bootstrap-os/molecule/default/converge.yml → roles/bootstrap_os/molecule/default/converge.yml

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

roles/bootstrap-os/molecule/default/molecule.yml → roles/bootstrap_os/molecule/default/molecule.yml

roles/bootstrap-os/molecule/default/tests/test_default.py → roles/bootstrap_os/molecule/default/tests/test_default.py

roles/bootstrap-os/tasks/amzn.yml → roles/bootstrap_os/tasks/amzn.yml

roles/bootstrap-os/tasks/centos.yml → roles/bootstrap_os/tasks/centos.yml

roles/bootstrap-os/tasks/clear-linux-os.yml → roles/bootstrap_os/tasks/clear-linux-os.yml

roles/bootstrap-os/tasks/debian.yml → roles/bootstrap_os/tasks/debian.yml

roles/bootstrap-os/tasks/fedora-coreos.yml → roles/bootstrap_os/tasks/fedora-coreos.yml

roles/bootstrap-os/tasks/fedora.yml → roles/bootstrap_os/tasks/fedora.yml

roles/bootstrap-os/tasks/flatcar.yml → roles/bootstrap_os/tasks/flatcar.yml

roles/bootstrap-os/tasks/main.yml → roles/bootstrap_os/tasks/main.yml

roles/bootstrap-os/tasks/openEuler.yml → roles/bootstrap_os/tasks/openEuler.yml

roles/bootstrap-os/tasks/opensuse-leap.yml → roles/bootstrap_os/tasks/opensuse-leap.yml

roles/bootstrap-os/tasks/opensuse-tumbleweed.yml → roles/bootstrap_os/tasks/opensuse-tumbleweed.yml

roles/bootstrap-os/tasks/opensuse.yml → roles/bootstrap_os/tasks/opensuse.yml

roles/bootstrap-os/tasks/rhel.yml → roles/bootstrap_os/tasks/rhel.yml

roles/bootstrap-os/tasks/ubuntu.yml → roles/bootstrap_os/tasks/ubuntu.yml

roles/bootstrap-os/vars/fedora-coreos.yml → roles/bootstrap_os/vars/fedora-coreos.yml

roles/bootstrap-os/vars/flatcar.yml → roles/bootstrap_os/vars/flatcar.yml

2
roles/container-engine/containerd/molecule/default/prepare.yml

@ -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

2
roles/container-engine/cri-dockerd/molecule/default/prepare.yml

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

2
roles/container-engine/cri-o/molecule/default/prepare.yml

@ -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

2
roles/container-engine/gvisor/molecule/default/prepare.yml

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

2
roles/container-engine/kata-containers/molecule/default/prepare.yml

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

2
roles/container-engine/youki/molecule/default/prepare.yml

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

8
roles/kubernetes/preinstall/tasks/0050-create_directories.yml

@ -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:

8
roles/kubernetes/preinstall/tasks/0080-system-configurations.yml

@ -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:

20
roles/kubernetes/preinstall/tasks/main.yml

@ -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:

10
roles/system_packages/tasks/main.yml

@ -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
Loading…
Cancel
Save