2015-12-31 00:11:33 +08:00
|
|
|
---
|
2018-06-21 14:17:03 +08:00
|
|
|
# Disable swap
|
2023-07-26 22:36:22 +08:00
|
|
|
- name: Disable swap
|
|
|
|
import_tasks: 0010-swapoff.yml
|
2018-11-01 23:08:50 +08:00
|
|
|
when:
|
|
|
|
- not dns_late
|
2023-05-12 01:53:04 +08:00
|
|
|
- kubelet_fail_swap_on
|
2018-06-21 14:17:03 +08:00
|
|
|
|
2023-07-26 22:36:22 +08:00
|
|
|
- name: Set facts
|
|
|
|
import_tasks: 0020-set_facts.yml
|
2023-03-31 09:53:49 +08:00
|
|
|
tags:
|
|
|
|
- resolvconf
|
|
|
|
- facts
|
|
|
|
|
2023-07-26 22:36:22 +08:00
|
|
|
- name: Check settings
|
|
|
|
import_tasks: 0040-verify-settings.yml
|
2018-11-01 23:08:50 +08:00
|
|
|
when:
|
|
|
|
- not dns_late
|
2017-10-05 15:43:04 +08:00
|
|
|
tags:
|
|
|
|
- asserts
|
2017-01-02 19:14:03 +08:00
|
|
|
|
2023-07-26 22:36:22 +08:00
|
|
|
- name: Create directories
|
|
|
|
import_tasks: 0050-create_directories.yml
|
2018-11-01 23:08:50 +08:00
|
|
|
when:
|
|
|
|
- not dns_late
|
2018-04-13 03:55:13 +08:00
|
|
|
|
2023-07-26 22:36:22 +08:00
|
|
|
- name: Apply resolvconf settings
|
|
|
|
import_tasks: 0060-resolvconf.yml
|
2017-10-18 18:42:00 +08:00
|
|
|
when:
|
|
|
|
- dns_mode != 'none'
|
|
|
|
- resolvconf_mode == 'host_resolvconf'
|
2019-11-06 19:33:52 +08:00
|
|
|
- systemd_resolved_enabled.rc != 0
|
2022-02-27 02:29:23 +08:00
|
|
|
- networkmanager_enabled.rc != 0
|
2019-11-06 19:33:52 +08:00
|
|
|
tags:
|
|
|
|
- bootstrap-os
|
|
|
|
- resolvconf
|
|
|
|
|
2023-07-26 22:36:22 +08:00
|
|
|
- name: Apply systemd-resolved settings
|
|
|
|
import_tasks: 0061-systemd-resolved.yml
|
2019-11-06 19:33:52 +08:00
|
|
|
when:
|
|
|
|
- dns_mode != 'none'
|
|
|
|
- resolvconf_mode == 'host_resolvconf'
|
|
|
|
- systemd_resolved_enabled.rc == 0
|
2017-10-18 18:42:00 +08:00
|
|
|
tags:
|
|
|
|
- bootstrap-os
|
|
|
|
- resolvconf
|
|
|
|
|
2023-07-26 22:36:22 +08:00
|
|
|
- name: Apply networkmanager unmanaged devices settings
|
|
|
|
import_tasks: 0062-networkmanager-unmanaged-devices.yml
|
2022-02-27 02:29:23 +08:00
|
|
|
when:
|
|
|
|
- networkmanager_enabled.rc == 0
|
2021-03-03 23:27:20 +08:00
|
|
|
tags:
|
|
|
|
- bootstrap-os
|
|
|
|
|
2023-07-26 22:36:22 +08:00
|
|
|
- name: Apply networkmanager DNS settings
|
|
|
|
import_tasks: 0063-networkmanager-dns.yml
|
2020-06-29 15:26:17 +08:00
|
|
|
when:
|
|
|
|
- dns_mode != 'none'
|
|
|
|
- resolvconf_mode == 'host_resolvconf'
|
2022-02-27 02:29:23 +08:00
|
|
|
- networkmanager_enabled.rc == 0
|
2020-06-29 15:26:17 +08:00
|
|
|
tags:
|
|
|
|
- bootstrap-os
|
|
|
|
- resolvconf
|
|
|
|
|
2023-07-26 22:36:22 +08:00
|
|
|
- name: Install required system packages
|
|
|
|
import_tasks: 0070-system-packages.yml
|
2018-11-01 23:08:50 +08:00
|
|
|
when:
|
|
|
|
- not dns_late
|
2017-10-05 15:43:04 +08:00
|
|
|
tags:
|
|
|
|
- bootstrap-os
|
2024-05-30 19:25:21 +08:00
|
|
|
- system-packages
|
2017-02-09 17:16:52 +08:00
|
|
|
|
2023-07-26 22:36:22 +08:00
|
|
|
- name: Apply system configurations
|
|
|
|
import_tasks: 0080-system-configurations.yml
|
2018-11-01 23:08:50 +08:00
|
|
|
when:
|
|
|
|
- not dns_late
|
2017-10-05 15:43:04 +08:00
|
|
|
tags:
|
|
|
|
- bootstrap-os
|
2015-12-31 05:15:18 +08:00
|
|
|
|
2023-07-26 22:36:22 +08:00
|
|
|
- name: Configure NTP
|
|
|
|
import_tasks: 0081-ntp-configurations.yml
|
2022-06-29 04:15:34 +08:00
|
|
|
when:
|
|
|
|
- not dns_late
|
|
|
|
- ntp_enabled
|
|
|
|
tags:
|
|
|
|
- bootstrap-os
|
|
|
|
|
2023-07-26 22:36:22 +08:00
|
|
|
- name: Configure /etc/hosts
|
|
|
|
import_tasks: 0090-etchosts.yml
|
2017-10-05 15:43:04 +08:00
|
|
|
tags:
|
|
|
|
- bootstrap-os
|
|
|
|
- etchosts
|
2016-12-07 23:57:05 +08:00
|
|
|
|
2023-07-26 22:36:22 +08:00
|
|
|
- name: Configure dhclient
|
|
|
|
import_tasks: 0100-dhclient-hooks.yml
|
2017-04-26 20:11:13 +08:00
|
|
|
when:
|
|
|
|
- dns_mode != 'none'
|
|
|
|
- resolvconf_mode == 'host_resolvconf'
|
2022-03-29 15:11:11 +08:00
|
|
|
- dhclientconffile is defined
|
2021-10-02 00:11:23 +08:00
|
|
|
- not ansible_os_family in ["Flatcar", "Flatcar Container Linux by Kinvolk"]
|
2017-10-05 15:43:04 +08:00
|
|
|
tags:
|
|
|
|
- bootstrap-os
|
|
|
|
- resolvconf
|
2017-01-11 22:08:24 +08:00
|
|
|
|
2023-07-26 22:36:22 +08:00
|
|
|
- name: Configure dhclient dhclient hooks
|
|
|
|
import_tasks: 0110-dhclient-hooks-undo.yml
|
2017-04-26 20:11:13 +08:00
|
|
|
when:
|
|
|
|
- dns_mode != 'none'
|
|
|
|
- resolvconf_mode != 'host_resolvconf'
|
2022-03-29 15:11:11 +08:00
|
|
|
- dhclientconffile is defined
|
2021-10-02 00:11:23 +08:00
|
|
|
- not ansible_os_family in ["Flatcar", "Flatcar Container Linux by Kinvolk"]
|
2017-10-05 15:43:04 +08:00
|
|
|
tags:
|
|
|
|
- bootstrap-os
|
|
|
|
- resolvconf
|
2017-01-11 22:08:24 +08:00
|
|
|
|
2018-10-18 03:27:11 +08:00
|
|
|
# We need to make sure the network is restarted early enough so that docker can later pick up the correct system
|
|
|
|
# nameservers and search domains
|
2021-07-12 15:00:47 +08:00
|
|
|
- name: Flush handlers
|
|
|
|
meta: flush_handlers
|
2018-10-18 03:27:11 +08:00
|
|
|
|
2016-12-12 21:14:22 +08:00
|
|
|
- name: Check if we are running inside a Azure VM
|
2017-02-18 05:22:34 +08:00
|
|
|
stat:
|
|
|
|
path: /var/lib/waagent/
|
2021-02-10 21:36:59 +08:00
|
|
|
get_attributes: no
|
|
|
|
get_checksum: no
|
|
|
|
get_mime: no
|
2016-12-12 21:14:22 +08:00
|
|
|
register: azure_check
|
2018-11-01 23:08:50 +08:00
|
|
|
when:
|
|
|
|
- not dns_late
|
2017-10-05 15:43:04 +08:00
|
|
|
tags:
|
|
|
|
- bootstrap-os
|
2016-12-12 21:14:22 +08:00
|
|
|
|
2023-07-26 22:36:22 +08:00
|
|
|
- name: Grow partition on azure CentOS
|
|
|
|
import_tasks: 0120-growpart-azure-centos-7.yml
|
2017-04-26 20:11:13 +08:00
|
|
|
when:
|
2018-11-01 23:08:50 +08:00
|
|
|
- not dns_late
|
2017-04-26 20:11:13 +08:00
|
|
|
- azure_check.stat.exists
|
2021-04-23 14:50:03 +08:00
|
|
|
- ansible_os_family == "RedHat"
|
2023-06-21 21:23:40 +08:00
|
|
|
- growpart_azure_enabled
|
2017-10-05 15:43:04 +08:00
|
|
|
tags:
|
|
|
|
- bootstrap-os
|
2022-04-14 16:08:46 +08:00
|
|
|
|
|
|
|
- name: Run calico checks
|
|
|
|
include_role:
|
|
|
|
name: network_plugin/calico
|
|
|
|
tasks_from: check
|
|
|
|
when:
|
|
|
|
- kube_network_plugin == 'calico'
|
|
|
|
- not ignore_assert_errors
|