2020-04-18 07:23:36 +08:00
|
|
|
---
|
2023-07-26 22:36:22 +08:00
|
|
|
- name: Bootstrap hosts for Ansible
|
|
|
|
hosts: k8s_cluster:etcd:calico_rr
|
2023-05-23 15:18:28 +08:00
|
|
|
strategy: linear
|
|
|
|
any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
|
|
|
|
gather_facts: false
|
|
|
|
environment: "{{ proxy_disable_env }}"
|
|
|
|
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.
|
|
|
|
ansible_ssh_pipelining: false
|
|
|
|
roles:
|
|
|
|
- { role: kubespray-defaults }
|
|
|
|
- { role: bootstrap-os, tags: bootstrap-os}
|
|
|
|
|
2020-04-18 07:23:36 +08:00
|
|
|
- name: Gather facts
|
2021-04-29 20:20:50 +08:00
|
|
|
hosts: k8s_cluster:etcd:calico_rr
|
2024-08-28 13:30:56 +08:00
|
|
|
gather_facts: false
|
2021-08-26 03:01:54 +08:00
|
|
|
tags: always
|
2020-04-18 07:23:36 +08:00
|
|
|
tasks:
|
|
|
|
- name: Gather minimal facts
|
|
|
|
setup:
|
|
|
|
gather_subset: '!all'
|
|
|
|
|
2021-02-17 01:34:58 +08:00
|
|
|
# filter match the following variables:
|
|
|
|
# ansible_default_ipv4
|
|
|
|
# ansible_default_ipv6
|
|
|
|
# ansible_all_ipv4_addresses
|
|
|
|
# ansible_all_ipv6_addresses
|
|
|
|
- name: Gather necessary facts (network)
|
2020-04-18 07:23:36 +08:00
|
|
|
setup:
|
2021-02-17 01:34:58 +08:00
|
|
|
gather_subset: '!all,!min,network'
|
|
|
|
filter: "ansible_*_ipv[46]*"
|
|
|
|
|
|
|
|
# filter match the following variables:
|
|
|
|
# ansible_memtotal_mb
|
|
|
|
# ansible_swaptotal_mb
|
|
|
|
- name: Gather necessary facts (hardware)
|
|
|
|
setup:
|
|
|
|
gather_subset: '!all,!min,hardware'
|
|
|
|
filter: "ansible_*total_mb"
|