mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-05-07 17:37:39 -02:30
@@ -29,6 +29,6 @@ openstack_tenant_id: "{{ lookup('env','OS_TENANT_ID') }}"
|
||||
# All clients access each node individually, instead of using a load balancer.
|
||||
etcd_multiaccess: true
|
||||
|
||||
# CoreOS cloud init config file to define /etc/resolv.conf content
|
||||
# Container Linux by CoreOS cloud init config file to define /etc/resolv.conf content
|
||||
# for hostnet pods and infra needs
|
||||
resolveconf_cloud_init_conf: /etc/resolveconf_cloud_init.conf
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
notify:
|
||||
- Preinstall | reload network
|
||||
- Preinstall | reload kubelet
|
||||
when: ansible_os_family != "CoreOS"
|
||||
when: ansible_os_family != "Container Linux by CoreOS"
|
||||
|
||||
# FIXME(bogdando) https://github.com/projectcalico/felix/issues/1185
|
||||
- name: Preinstall | reload network
|
||||
@@ -15,18 +15,18 @@
|
||||
networking
|
||||
{%- endif %}
|
||||
state: restarted
|
||||
when: ansible_os_family != "CoreOS" and kube_network_plugin not in ['canal', 'calico']
|
||||
when: ansible_os_family != "Container Linux by CoreOS" and kube_network_plugin not in ['canal', 'calico']
|
||||
|
||||
- name: Preinstall | update resolvconf for CoreOS
|
||||
- name: Preinstall | update resolvconf for Container Linux by CoreOS
|
||||
command: /bin/true
|
||||
notify:
|
||||
- Preinstall | apply resolvconf cloud-init
|
||||
- Preinstall | reload kubelet
|
||||
when: ansible_os_family == "CoreOS"
|
||||
when: ansible_os_family == "Container Linux by CoreOS"
|
||||
|
||||
- name: Preinstall | apply resolvconf cloud-init
|
||||
command: /usr/bin/coreos-cloudinit --from-file {{ resolveconf_cloud_init_conf }}
|
||||
when: ansible_os_family == "CoreOS"
|
||||
when: ansible_os_family == "Container Linux by CoreOS"
|
||||
|
||||
- name: Preinstall | reload kubelet
|
||||
service:
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
- include: pre-upgrade.yml
|
||||
tags: [upgrade, bootstrap-os]
|
||||
|
||||
- name: Force binaries directory for CoreOS
|
||||
- name: Force binaries directory for Container Linux by CoreOS
|
||||
set_fact:
|
||||
bin_dir: "/opt/bin"
|
||||
when: ansible_os_family == "CoreOS"
|
||||
when: ansible_os_family == "Container Linux by CoreOS"
|
||||
tags: facts
|
||||
|
||||
- name: check bin dir exists
|
||||
@@ -131,7 +131,7 @@
|
||||
retries: 4
|
||||
delay: "{{ retry_stagger | random + 3 }}"
|
||||
with_items: "{{required_pkgs | default([]) | union(common_required_pkgs|default([]))}}"
|
||||
when: ansible_os_family != "CoreOS"
|
||||
when: ansible_os_family != "Container Linux by CoreOS"
|
||||
tags: bootstrap-os
|
||||
|
||||
- name: Disable IPv6 DNS lookup
|
||||
@@ -140,7 +140,7 @@
|
||||
line: "precedence ::ffff:0:0/96 100"
|
||||
state: present
|
||||
backup: yes
|
||||
when: disable_ipv6_dns and ansible_os_family != "CoreOS"
|
||||
when: disable_ipv6_dns and ansible_os_family != "Container Linux by CoreOS"
|
||||
tags: bootstrap-os
|
||||
|
||||
# Todo : selinux configuration
|
||||
|
||||
@@ -2,3 +2,7 @@
|
||||
- name: Stop if non systemd OS type
|
||||
assert:
|
||||
that: ansible_service_mgr == "systemd"
|
||||
|
||||
- name: Stop if obsolete CoreOS family fact value
|
||||
assert:
|
||||
that: ansible_os_family != "CoreOS"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
- name: create temporary resolveconf cloud init file
|
||||
command: cp -f /etc/resolv.conf "{{ resolvconffile }}"
|
||||
when: ansible_os_family == "CoreOS"
|
||||
when: ansible_os_family == "Container Linux by CoreOS"
|
||||
|
||||
- name: Remove search/domain/nameserver options
|
||||
lineinfile:
|
||||
@@ -48,7 +48,7 @@
|
||||
- name: get temporary resolveconf cloud init file content
|
||||
command: cat {{ resolvconffile }}
|
||||
register: cloud_config
|
||||
when: ansible_os_family == "CoreOS"
|
||||
when: ansible_os_family == "Container Linux by CoreOS"
|
||||
|
||||
- name: persist resolvconf cloud init file
|
||||
template:
|
||||
@@ -56,9 +56,9 @@
|
||||
src: resolvconf.j2
|
||||
owner: root
|
||||
mode: 0644
|
||||
notify: Preinstall | update resolvconf for CoreOS
|
||||
when: ansible_os_family == "CoreOS"
|
||||
notify: Preinstall | update resolvconf for Container Linux by CoreOS
|
||||
when: ansible_os_family == "Container Linux by CoreOS"
|
||||
|
||||
- include: dhclient-hooks.yml
|
||||
when: ansible_os_family != "CoreOS"
|
||||
when: ansible_os_family != "Container Linux by CoreOS"
|
||||
tags: [bootstrap-os, resolvconf]
|
||||
|
||||
@@ -35,11 +35,11 @@
|
||||
{%- if resolvconf|bool -%}/etc/resolvconf/resolv.conf.d/base{%- endif -%}
|
||||
head: >-
|
||||
{%- if resolvconf|bool -%}/etc/resolvconf/resolv.conf.d/head{%- endif -%}
|
||||
when: ansible_os_family != "CoreOS"
|
||||
when: ansible_os_family != "Container Linux by CoreOS"
|
||||
|
||||
- name: target temporary resolvconf cloud init file (CoreOS)
|
||||
- name: target temporary resolvconf cloud init file (Container Linux by CoreOS)
|
||||
set_fact: resolvconffile=/tmp/resolveconf_cloud_init_conf
|
||||
when: ansible_os_family == "CoreOS"
|
||||
when: ansible_os_family == "Container Linux by CoreOS"
|
||||
|
||||
- name: target dhclient conf/hook files for Red Hat family
|
||||
set_fact:
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
/usr/local/share/ca-certificates/kube-ca.crt
|
||||
{%- elif ansible_os_family == "RedHat" -%}
|
||||
/etc/pki/ca-trust/source/anchors/kube-ca.crt
|
||||
{%- elif ansible_os_family == "CoreOS" -%}
|
||||
{%- elif ansible_os_family == "Container Linux by CoreOS" -%}
|
||||
/etc/ssl/certs/kube-ca.pem
|
||||
{%- endif %}
|
||||
tags: facts
|
||||
@@ -86,9 +86,9 @@
|
||||
remote_src: true
|
||||
register: kube_ca_cert
|
||||
|
||||
- name: Gen_certs | update ca-certificates (Debian/Ubuntu/CoreOS)
|
||||
- name: Gen_certs | update ca-certificates (Debian/Ubuntu/Container Linux by CoreOS)
|
||||
command: update-ca-certificates
|
||||
when: kube_ca_cert.changed and ansible_os_family in ["Debian", "CoreOS"]
|
||||
when: kube_ca_cert.changed and ansible_os_family in ["Debian", "Container Linux by CoreOS"]
|
||||
|
||||
- name: Gen_certs | update ca-certificates (RedHat)
|
||||
command: update-ca-trust extract
|
||||
|
||||
Reference in New Issue
Block a user