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

89 lines
1.9 KiB
YAML
Raw Normal View History

---
2018-06-21 14:17:03 +08:00
# Disable swap
2018-08-23 22:51:52 +08:00
- import_tasks: 0010-swapoff.yml
2018-06-21 14:17:03 +08:00
when: disable_swap
2018-08-23 22:51:52 +08:00
- import_tasks: 0020-verify-settings.yml
tags:
- asserts
# This is run before bin_dir is pinned because these tasks are run on localhost
2018-08-23 22:51:52 +08:00
- import_tasks: 0030-pre_upgrade.yml
run_once: true
tags:
- upgrade
2018-08-23 22:51:52 +08:00
- import_tasks: 0040-set_facts.yml
tags:
2018-08-23 22:51:52 +08:00
- resolvconf
- facts
2018-08-23 22:51:52 +08:00
- import_tasks: 0050-create_directories.yml
2018-08-23 22:51:52 +08:00
- import_tasks: 0060-resolvconf.yml
when:
- dns_mode != 'none'
- resolvconf_mode == 'host_resolvconf'
tags:
- bootstrap-os
- resolvconf
2018-08-23 22:51:52 +08:00
- import_tasks: 0070-system-packages.yml
tags:
- bootstrap-os
2018-08-23 22:51:52 +08:00
- import_tasks: 0080-system-configurations.yml
tags:
- bootstrap-os
2018-08-23 22:51:52 +08:00
- import_tasks: 0090-etchosts.yml
tags:
- bootstrap-os
- etchosts
2018-08-23 22:51:52 +08:00
- import_tasks: 0100-dhclient-hooks.yml
when:
- dns_mode != 'none'
- resolvconf_mode == 'host_resolvconf'
- not ansible_os_family in ["CoreOS", "Container Linux by CoreOS"]
tags:
- bootstrap-os
- resolvconf
2018-08-23 22:51:52 +08:00
- import_tasks: 0110-dhclient-hooks-undo.yml
when:
- dns_mode != 'none'
- resolvconf_mode != 'host_resolvconf'
- not ansible_os_family in ["CoreOS", "Container Linux by CoreOS"]
tags:
- bootstrap-os
- resolvconf
2016-12-12 21:14:22 +08:00
- name: Check if we are running inside a Azure VM
stat:
path: /var/lib/waagent/
2016-12-12 21:14:22 +08:00
register: azure_check
tags:
- bootstrap-os
2016-12-12 21:14:22 +08:00
2018-08-23 22:51:52 +08:00
- import_tasks: 0120-growpart-azure-centos-7.yml
when:
- azure_check.stat.exists
- ansible_distribution in ["CentOS","RedHat"]
tags:
- bootstrap-os
- name: Write cacert file
copy:
content: "{{ openstack_cacert }}"
dest: "{{ kube_config_dir }}/openstack-cacert.pem"
group: "{{ kube_cert_group }}"
mode: 0640
when:
- inventory_hostname in groups['k8s-cluster']
- cloud_provider is defined
- cloud_provider in [ 'openstack', 'azure', 'vsphere' ]
- openstack_cacert is defined
tags:
- cloud-provider