Fix kubespray flatcar ansible_os_family and ansible_distribution (#8181)
Closes https://github.com/kubernetes-sigs/kubespray/issues/8028 Signed-off-by: Iago Santos <iago.santos.pardo@adfinis.com>
This commit is contained in:
parent
2b7247f842
commit
f4dae74117
25 changed files with 48 additions and 48 deletions
|
@ -57,7 +57,7 @@
|
||||||
name: "{{ inventory_hostname }}"
|
name: "{{ inventory_hostname }}"
|
||||||
when:
|
when:
|
||||||
- override_system_hostname
|
- override_system_hostname
|
||||||
- ansible_os_family not in ['Suse', 'Flatcar Container Linux by Kinvolk', 'ClearLinux'] and not is_fedora_coreos
|
- ansible_os_family not in ['Suse', 'Flatcar', 'Flatcar Container Linux by Kinvolk', 'ClearLinux'] and not is_fedora_coreos
|
||||||
|
|
||||||
# (2/3)
|
# (2/3)
|
||||||
- name: Assign inventory name to unconfigured hostnames (CoreOS, Flatcar, Suse and ClearLinux only)
|
- name: Assign inventory name to unconfigured hostnames (CoreOS, Flatcar, Suse and ClearLinux only)
|
||||||
|
@ -67,7 +67,7 @@
|
||||||
changed_when: false
|
changed_when: false
|
||||||
when:
|
when:
|
||||||
- override_system_hostname
|
- override_system_hostname
|
||||||
- ansible_os_family in ['Suse', 'Flatcar Container Linux by Kinvolk', 'ClearLinux'] or is_fedora_coreos
|
- ansible_os_family in ['Suse', 'Flatcar', 'Flatcar Container Linux by Kinvolk', 'ClearLinux'] or is_fedora_coreos
|
||||||
|
|
||||||
# (3/3)
|
# (3/3)
|
||||||
- name: Update hostname fact (CoreOS, Flatcar, Suse and ClearLinux only)
|
- name: Update hostname fact (CoreOS, Flatcar, Suse and ClearLinux only)
|
||||||
|
@ -76,7 +76,7 @@
|
||||||
filter: ansible_hostname
|
filter: ansible_hostname
|
||||||
when:
|
when:
|
||||||
- override_system_hostname
|
- override_system_hostname
|
||||||
- ansible_os_family in ['Suse', 'Flatcar Container Linux by Kinvolk', 'ClearLinux'] or is_fedora_coreos
|
- ansible_os_family in ['Suse', 'Flatcar', 'Flatcar Container Linux by Kinvolk', 'ClearLinux'] or is_fedora_coreos
|
||||||
|
|
||||||
- name: "Install ceph-commmon package"
|
- name: "Install ceph-commmon package"
|
||||||
package:
|
package:
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
fail:
|
fail:
|
||||||
msg: "{{ ansible_distribution }} is not supported by containerd."
|
msg: "{{ ansible_distribution }} is not supported by containerd."
|
||||||
when:
|
when:
|
||||||
- not ansible_distribution in ["CentOS", "OracleLinux", "RedHat", "Ubuntu", "Debian", "Fedora", "AlmaLinux", "Amazon", "Flatcar Container Linux by Kinvolk"]
|
- not ansible_distribution in ["CentOS", "OracleLinux", "RedHat", "Ubuntu", "Debian", "Fedora", "AlmaLinux", "Amazon", "Flatcar", "Flatcar Container Linux by Kinvolk"]
|
||||||
|
|
||||||
- name: gather os specific variables
|
- name: gather os specific variables
|
||||||
include_vars: "{{ item }}"
|
include_vars: "{{ item }}"
|
||||||
|
@ -53,7 +53,7 @@
|
||||||
- not is_ostree
|
- not is_ostree
|
||||||
|
|
||||||
- include_tasks: containerd_repo.yml
|
- include_tasks: containerd_repo.yml
|
||||||
when: not (is_ostree or (ansible_distribution == "Flatcar Container Linux by Kinvolk"))
|
when: not (is_ostree or (ansible_distribution == "Flatcar Container Linux by Kinvolk") or (ansible_distribution == "Flatcar"))
|
||||||
|
|
||||||
- name: Create containerd service systemd directory if it doesn't exist
|
- name: Create containerd service systemd directory if it doesn't exist
|
||||||
file:
|
file:
|
||||||
|
@ -116,7 +116,7 @@
|
||||||
delay: "{{ retry_stagger | d(3) }}"
|
delay: "{{ retry_stagger | d(3) }}"
|
||||||
notify: restart containerd
|
notify: restart containerd
|
||||||
when:
|
when:
|
||||||
- not (is_ostree or (ansible_distribution == "Flatcar Container Linux by Kinvolk"))
|
- not (is_ostree or (ansible_distribution == "Flatcar Container Linux by Kinvolk") or (ansible_distribution == "Flatcar"))
|
||||||
- containerd_package_info.pkgs|length > 0
|
- containerd_package_info.pkgs|length > 0
|
||||||
|
|
||||||
- include_role: # noqa unnamed-task
|
- include_role: # noqa unnamed-task
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
service:
|
service:
|
||||||
name: docker.socket
|
name: docker.socket
|
||||||
state: restarted
|
state: restarted
|
||||||
when: ansible_os_family in ['Flatcar Container Linux by Kinvolk'] or is_fedora_coreos
|
when: ansible_os_family in ['Flatcar', 'Flatcar Container Linux by Kinvolk'] or is_fedora_coreos
|
||||||
|
|
||||||
- name: Docker | reload docker
|
- name: Docker | reload docker
|
||||||
service:
|
service:
|
||||||
|
|
|
@ -123,7 +123,7 @@
|
||||||
delay: "{{ retry_stagger | d(3) }}"
|
delay: "{{ retry_stagger | d(3) }}"
|
||||||
notify: restart docker
|
notify: restart docker
|
||||||
when:
|
when:
|
||||||
- not ansible_os_family in ["Flatcar Container Linux by Kinvolk"]
|
- not ansible_os_family in ["Flatcar", "Flatcar Container Linux by Kinvolk"]
|
||||||
- not is_ostree
|
- not is_ostree
|
||||||
- docker_package_info.pkgs|length > 0
|
- docker_package_info.pkgs|length > 0
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
register: docker_service_file
|
register: docker_service_file
|
||||||
notify: restart docker
|
notify: restart docker
|
||||||
when:
|
when:
|
||||||
- not ansible_os_family in ["Flatcar Container Linux by Kinvolk"]
|
- not ansible_os_family in ["Flatcar", "Flatcar Container Linux by Kinvolk"]
|
||||||
- not is_fedora_coreos
|
- not is_fedora_coreos
|
||||||
|
|
||||||
- name: Write docker options systemd drop-in
|
- name: Write docker options systemd drop-in
|
||||||
|
|
|
@ -1111,7 +1111,7 @@ downloads:
|
||||||
- k8s_cluster
|
- k8s_cluster
|
||||||
|
|
||||||
install_socat:
|
install_socat:
|
||||||
enabled: "{{ ansible_os_family in ['Flatcar Container Linux by Kinvolk'] }}"
|
enabled: "{{ ansible_os_family in ['Flatcar', 'Flatcar Container Linux by Kinvolk'] }}"
|
||||||
container: true
|
container: true
|
||||||
repo: "{{ install_socat_image_repo }}"
|
repo: "{{ install_socat_image_repo }}"
|
||||||
tag: "{{ install_socat_image_tag }}"
|
tag: "{{ install_socat_image_tag }}"
|
||||||
|
|
|
@ -99,7 +99,7 @@
|
||||||
mode: 0755
|
mode: 0755
|
||||||
owner: "{{ ansible_ssh_user | default(ansible_user_id) }}"
|
owner: "{{ ansible_ssh_user | default(ansible_user_id) }}"
|
||||||
when:
|
when:
|
||||||
- ansible_os_family not in ["Flatcar Container Linux by Kinvolk"]
|
- ansible_os_family not in ["Flatcar", "Flatcar Container Linux by Kinvolk"]
|
||||||
|
|
||||||
- name: prep_download | Create local cache for files and images on control node
|
- name: prep_download | Create local cache for files and images on control node
|
||||||
file:
|
file:
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
dependencies:
|
dependencies:
|
||||||
- role: adduser
|
- role: adduser
|
||||||
user: "{{ addusers.etcd }}"
|
user: "{{ addusers.etcd }}"
|
||||||
when: not (ansible_os_family in ["Flatcar Container Linux by Kinvolk", "ClearLinux"] or is_fedora_coreos)
|
when: not (ansible_os_family in ["Flatcar", "Flatcar Container Linux by Kinvolk", "ClearLinux"] or is_fedora_coreos)
|
||||||
- role: adduser
|
- role: adduser
|
||||||
user: "{{ addusers.kube }}"
|
user: "{{ addusers.kube }}"
|
||||||
when: not (ansible_os_family in ["Flatcar Container Linux by Kinvolk", "ClearLinux"] or is_fedora_coreos)
|
when: not (ansible_os_family in ["Flatcar", "Flatcar Container Linux by Kinvolk", "ClearLinux"] or is_fedora_coreos)
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
/usr/local/share/ca-certificates/etcd-ca.crt
|
/usr/local/share/ca-certificates/etcd-ca.crt
|
||||||
{%- elif ansible_os_family == "RedHat" -%}
|
{%- elif ansible_os_family == "RedHat" -%}
|
||||||
/etc/pki/ca-trust/source/anchors/etcd-ca.crt
|
/etc/pki/ca-trust/source/anchors/etcd-ca.crt
|
||||||
{%- elif ansible_os_family in ["Flatcar Container Linux by Kinvolk"] -%}
|
{%- elif ansible_os_family in ["Flatcar", "Flatcar Container Linux by Kinvolk"] -%}
|
||||||
/etc/ssl/certs/etcd-ca.pem
|
/etc/ssl/certs/etcd-ca.pem
|
||||||
{%- elif ansible_os_family == "Suse" -%}
|
{%- elif ansible_os_family == "Suse" -%}
|
||||||
/etc/pki/trust/anchors/etcd-ca.pem
|
/etc/pki/trust/anchors/etcd-ca.pem
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
- name: Gen_certs | update ca-certificates (Debian/Ubuntu/SUSE/Flatcar) # noqa 503
|
- name: Gen_certs | update ca-certificates (Debian/Ubuntu/SUSE/Flatcar) # noqa 503
|
||||||
command: update-ca-certificates
|
command: update-ca-certificates
|
||||||
when: etcd_ca_cert.changed and ansible_os_family in ["Debian", "Flatcar Container Linux by Kinvolk", "Suse"]
|
when: etcd_ca_cert.changed and ansible_os_family in ["Debian", "Flatcar", "Flatcar Container Linux by Kinvolk", "Suse"]
|
||||||
|
|
||||||
- name: Gen_certs | update ca-certificates (RedHat) # noqa 503
|
- name: Gen_certs | update ca-certificates (RedHat) # noqa 503
|
||||||
command: update-ca-trust extract
|
command: update-ca-trust extract
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
args:
|
args:
|
||||||
creates: "{{ bin_dir }}/socat"
|
creates: "{{ bin_dir }}/socat"
|
||||||
when:
|
when:
|
||||||
- ansible_os_family in ['Flatcar Container Linux by Kinvolk']
|
- ansible_os_family in ['Flatcar', 'Flatcar Container Linux by Kinvolk']
|
||||||
- container_manager == "docker"
|
- container_manager == "docker"
|
||||||
|
|
||||||
- name: install | Copy socat wrapper for Container Linux with Containerd
|
- name: install | Copy socat wrapper for Container Linux with Containerd
|
||||||
|
@ -34,7 +34,7 @@
|
||||||
args:
|
args:
|
||||||
creates: "{{ bin_dir }}/socat"
|
creates: "{{ bin_dir }}/socat"
|
||||||
when:
|
when:
|
||||||
- ansible_os_family in ['Flatcar Container Linux by Kinvolk']
|
- ansible_os_family in ['Flatcar', 'Flatcar Container Linux by Kinvolk']
|
||||||
- container_manager == "containerd"
|
- container_manager == "containerd"
|
||||||
|
|
||||||
- name: install | Copy socat wrapper for Container Linux with crio
|
- name: install | Copy socat wrapper for Container Linux with crio
|
||||||
|
@ -42,5 +42,5 @@
|
||||||
args:
|
args:
|
||||||
creates: "{{ bin_dir }}/socat"
|
creates: "{{ bin_dir }}/socat"
|
||||||
when:
|
when:
|
||||||
- ansible_os_family in ['Flatcar Container Linux by Kinvolk']
|
- ansible_os_family in ['Flatcar', 'Flatcar Container Linux by Kinvolk']
|
||||||
- container_manager == "crio"
|
- container_manager == "crio"
|
||||||
|
|
|
@ -9,18 +9,18 @@
|
||||||
- Preinstall | restart kube-controller-manager crio/containerd
|
- Preinstall | restart kube-controller-manager crio/containerd
|
||||||
- Preinstall | restart kube-apiserver docker
|
- Preinstall | restart kube-apiserver docker
|
||||||
- Preinstall | restart kube-apiserver crio/containerd
|
- Preinstall | restart kube-apiserver crio/containerd
|
||||||
when: not ansible_os_family in ["Flatcar Container Linux by Kinvolk"] and not is_fedora_coreos
|
when: not ansible_os_family in ["Flatcar", "Flatcar Container Linux by Kinvolk"] and not is_fedora_coreos
|
||||||
|
|
||||||
- name: Preinstall | update resolvconf for Flatcar Container Linux by Kinvolk
|
- name: Preinstall | update resolvconf for Flatcar Container Linux by Kinvolk
|
||||||
command: /bin/true
|
command: /bin/true
|
||||||
notify:
|
notify:
|
||||||
- Preinstall | apply resolvconf cloud-init
|
- Preinstall | apply resolvconf cloud-init
|
||||||
- Preinstall | reload kubelet
|
- Preinstall | reload kubelet
|
||||||
when: ansible_os_family in ["Flatcar Container Linux by Kinvolk"]
|
when: ansible_os_family in ["Flatcar", "Flatcar Container Linux by Kinvolk"]
|
||||||
|
|
||||||
- name: Preinstall | apply resolvconf cloud-init
|
- name: Preinstall | apply resolvconf cloud-init
|
||||||
command: /usr/bin/coreos-cloudinit --from-file {{ resolveconf_cloud_init_conf }}
|
command: /usr/bin/coreos-cloudinit --from-file {{ resolveconf_cloud_init_conf }}
|
||||||
when: ansible_os_family in ["Flatcar Container Linux by Kinvolk"]
|
when: ansible_os_family in ["Flatcar", "Flatcar Container Linux by Kinvolk"]
|
||||||
|
|
||||||
- name: Preinstall | update resolvconf for Fedora CoreOS
|
- name: Preinstall | update resolvconf for Fedora CoreOS
|
||||||
command: /bin/true
|
command: /bin/true
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
- name: Stop if unknown OS
|
- name: Stop if unknown OS
|
||||||
assert:
|
assert:
|
||||||
that: ansible_distribution in ['RedHat', 'CentOS', 'Fedora', 'Ubuntu', 'Debian', 'Flatcar Container Linux by Kinvolk', 'Suse', 'openSUSE Leap', 'ClearLinux', 'OracleLinux', 'AlmaLinux', 'Amazon']
|
that: ansible_distribution in ['RedHat', 'CentOS', 'Fedora', 'Ubuntu', 'Debian', 'Flatcar', 'Flatcar Container Linux by Kinvolk', 'Suse', 'openSUSE Leap', 'ClearLinux', 'OracleLinux', 'AlmaLinux', 'Amazon']
|
||||||
msg: "{{ ansible_distribution }} is not a known OS"
|
msg: "{{ ansible_distribution }} is not a known OS"
|
||||||
when: not ignore_assert_errors
|
when: not ignore_assert_errors
|
||||||
|
|
||||||
|
@ -337,7 +337,7 @@
|
||||||
|
|
||||||
- name: Stop if download_localhost is enabled for Flatcar Container Linux
|
- name: Stop if download_localhost is enabled for Flatcar Container Linux
|
||||||
assert:
|
assert:
|
||||||
that: ansible_os_family not in ["Flatcar Container Linux by Kinvolk"]
|
that: ansible_os_family not in ["Flatcar", "Flatcar Container Linux by Kinvolk"]
|
||||||
msg: "download_run_once not supported for Flatcar Container Linux"
|
msg: "download_run_once not supported for Flatcar Container Linux"
|
||||||
when: download_run_once or download_force_cache
|
when: download_run_once or download_force_cache
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
- name: Force binaries directory for Flatcar Container Linux by Kinvolk
|
- name: Force binaries directory for Flatcar Container Linux by Kinvolk
|
||||||
set_fact:
|
set_fact:
|
||||||
bin_dir: "/opt/bin"
|
bin_dir: "/opt/bin"
|
||||||
when: ansible_os_family in ["Flatcar Container Linux by Kinvolk"]
|
when: ansible_os_family in ["Flatcar", "Flatcar Container Linux by Kinvolk"]
|
||||||
tags:
|
tags:
|
||||||
- facts
|
- facts
|
||||||
|
|
||||||
|
@ -75,12 +75,12 @@
|
||||||
{%- if resolvconf|bool -%}/etc/resolvconf/resolv.conf.d/base{%- endif -%}
|
{%- if resolvconf|bool -%}/etc/resolvconf/resolv.conf.d/base{%- endif -%}
|
||||||
head: >-
|
head: >-
|
||||||
{%- if resolvconf|bool -%}/etc/resolvconf/resolv.conf.d/head{%- endif -%}
|
{%- if resolvconf|bool -%}/etc/resolvconf/resolv.conf.d/head{%- endif -%}
|
||||||
when: not ansible_os_family in ["Flatcar Container Linux by Kinvolk"] and not is_fedora_coreos
|
when: not ansible_os_family in ["Flatcar", "Flatcar Container Linux by Kinvolk"] and not is_fedora_coreos
|
||||||
|
|
||||||
- name: target temporary resolvconf cloud init file (Flatcar Container Linux by Kinvolk / Fedora CoreOS)
|
- name: target temporary resolvconf cloud init file (Flatcar Container Linux by Kinvolk / Fedora CoreOS)
|
||||||
set_fact:
|
set_fact:
|
||||||
resolvconffile: /tmp/resolveconf_cloud_init_conf
|
resolvconffile: /tmp/resolveconf_cloud_init_conf
|
||||||
when: ansible_os_family in ["Flatcar Container Linux by Kinvolk"] or is_fedora_coreos
|
when: ansible_os_family in ["Flatcar", "Flatcar Container Linux by Kinvolk"] or is_fedora_coreos
|
||||||
|
|
||||||
- name: check if /etc/dhclient.conf exists
|
- name: check if /etc/dhclient.conf exists
|
||||||
stat:
|
stat:
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
---
|
---
|
||||||
- name: create temporary resolveconf cloud init file
|
- name: create temporary resolveconf cloud init file
|
||||||
command: cp -f /etc/resolv.conf "{{ resolvconffile }}"
|
command: cp -f /etc/resolv.conf "{{ resolvconffile }}"
|
||||||
when: ansible_os_family in ["Flatcar Container Linux by Kinvolk"]
|
when: ansible_os_family in ["Flatcar", "Flatcar Container Linux by Kinvolk"]
|
||||||
|
|
||||||
- name: Add domain/search/nameservers/options to resolv.conf
|
- name: Add domain/search/nameservers/options to resolv.conf
|
||||||
blockinfile:
|
blockinfile:
|
||||||
|
@ -46,7 +46,7 @@
|
||||||
- name: get temporary resolveconf cloud init file content
|
- name: get temporary resolveconf cloud init file content
|
||||||
command: cat {{ resolvconffile }}
|
command: cat {{ resolvconffile }}
|
||||||
register: cloud_config
|
register: cloud_config
|
||||||
when: ansible_os_family in ["Flatcar Container Linux by Kinvolk"]
|
when: ansible_os_family in ["Flatcar", "Flatcar Container Linux by Kinvolk"]
|
||||||
|
|
||||||
- name: persist resolvconf cloud init file
|
- name: persist resolvconf cloud init file
|
||||||
template:
|
template:
|
||||||
|
@ -55,4 +55,4 @@
|
||||||
owner: root
|
owner: root
|
||||||
mode: 0644
|
mode: 0644
|
||||||
notify: Preinstall | update resolvconf for Flatcar Container Linux by Kinvolk
|
notify: Preinstall | update resolvconf for Flatcar Container Linux by Kinvolk
|
||||||
when: ansible_os_family in ["Flatcar Container Linux by Kinvolk"]
|
when: ansible_os_family in ["Flatcar", "Flatcar Container Linux by Kinvolk"]
|
||||||
|
|
|
@ -63,7 +63,7 @@
|
||||||
until: pkgs_task_result is succeeded
|
until: pkgs_task_result is succeeded
|
||||||
retries: "{{ pkg_install_retries }}"
|
retries: "{{ pkg_install_retries }}"
|
||||||
delay: "{{ retry_stagger | random + 3 }}"
|
delay: "{{ retry_stagger | random + 3 }}"
|
||||||
when: not (ansible_os_family in ["Flatcar Container Linux by Kinvolk", "ClearLinux"] or is_fedora_coreos)
|
when: not (ansible_os_family in ["Flatcar", "Flatcar Container Linux by Kinvolk", "ClearLinux"] or is_fedora_coreos)
|
||||||
tags:
|
tags:
|
||||||
- bootstrap-os
|
- bootstrap-os
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
mode: 0644
|
mode: 0644
|
||||||
when:
|
when:
|
||||||
- disable_ipv6_dns
|
- disable_ipv6_dns
|
||||||
- not ansible_os_family in ["Flatcar Container Linux by Kinvolk"]
|
- not ansible_os_family in ["Flatcar", "Flatcar Container Linux by Kinvolk"]
|
||||||
tags:
|
tags:
|
||||||
- bootstrap-os
|
- bootstrap-os
|
||||||
|
|
||||||
|
|
|
@ -75,7 +75,7 @@
|
||||||
when:
|
when:
|
||||||
- dns_mode != 'none'
|
- dns_mode != 'none'
|
||||||
- resolvconf_mode == 'host_resolvconf'
|
- resolvconf_mode == 'host_resolvconf'
|
||||||
- not ansible_os_family in ["Flatcar Container Linux by Kinvolk"]
|
- not ansible_os_family in ["Flatcar", "Flatcar Container Linux by Kinvolk"]
|
||||||
tags:
|
tags:
|
||||||
- bootstrap-os
|
- bootstrap-os
|
||||||
- resolvconf
|
- resolvconf
|
||||||
|
@ -84,7 +84,7 @@
|
||||||
when:
|
when:
|
||||||
- dns_mode != 'none'
|
- dns_mode != 'none'
|
||||||
- resolvconf_mode != 'host_resolvconf'
|
- resolvconf_mode != 'host_resolvconf'
|
||||||
- not ansible_os_family in ["Flatcar Container Linux by Kinvolk"]
|
- not ansible_os_family in ["Flatcar", "Flatcar Container Linux by Kinvolk"]
|
||||||
tags:
|
tags:
|
||||||
- bootstrap-os
|
- bootstrap-os
|
||||||
- resolvconf
|
- resolvconf
|
||||||
|
|
|
@ -458,7 +458,7 @@ weave_password: EnterPasswordHere
|
||||||
|
|
||||||
ssl_ca_dirs: |-
|
ssl_ca_dirs: |-
|
||||||
[
|
[
|
||||||
{% if ansible_os_family in ['Flatcar Container Linux by Kinvolk'] -%}
|
{% if ansible_os_family in ['Flatcar', 'Flatcar Container Linux by Kinvolk'] -%}
|
||||||
'/usr/share/ca-certificates',
|
'/usr/share/ca-certificates',
|
||||||
{% elif ansible_os_family == 'RedHat' -%}
|
{% elif ansible_os_family == 'RedHat' -%}
|
||||||
'/etc/pki/tls',
|
'/etc/pki/tls',
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
command: /bin/true
|
command: /bin/true
|
||||||
notify:
|
notify:
|
||||||
- Macvlan | reload network
|
- Macvlan | reload network
|
||||||
when: not ansible_os_family in ["Flatcar Container Linux by Kinvolk"]
|
when: not ansible_os_family in ["Flatcar", "Flatcar Container Linux by Kinvolk"]
|
||||||
|
|
||||||
- name: Macvlan | reload network
|
- name: Macvlan | reload network
|
||||||
service:
|
service:
|
||||||
|
@ -16,4 +16,4 @@
|
||||||
networking
|
networking
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
state: restarted
|
state: restarted
|
||||||
when: not ansible_os_family in ["Flatcar Container Linux by Kinvolk"] and kube_network_plugin not in ['canal', 'calico']
|
when: not ansible_os_family in ["Flatcar", "Flatcar Container Linux by Kinvolk"] and kube_network_plugin not in ['canal', 'calico']
|
||||||
|
|
|
@ -61,14 +61,14 @@
|
||||||
template:
|
template:
|
||||||
src: coreos-service-nat_ouside.j2
|
src: coreos-service-nat_ouside.j2
|
||||||
dest: /etc/systemd/system/enable_nat_ouside.service
|
dest: /etc/systemd/system/enable_nat_ouside.service
|
||||||
when: ansible_os_family in ["Flatcar Container Linux by Kinvolk"] and enable_nat_default_gateway
|
when: ansible_os_family in ["Flatcar", "Flatcar Container Linux by Kinvolk"] and enable_nat_default_gateway
|
||||||
|
|
||||||
- name: Macvlan | Enable service nat via gateway on Flatcar Container Linux
|
- name: Macvlan | Enable service nat via gateway on Flatcar Container Linux
|
||||||
command: "{{ item }}"
|
command: "{{ item }}"
|
||||||
with_items:
|
with_items:
|
||||||
- systemctl daemon-reload
|
- systemctl daemon-reload
|
||||||
- systemctl enable enable_nat_ouside.service
|
- systemctl enable enable_nat_ouside.service
|
||||||
when: ansible_os_family in ["Flatcar Container Linux by Kinvolk"] and enable_nat_default_gateway
|
when: ansible_os_family in ["Flatcar", "Flatcar Container Linux by Kinvolk"] and enable_nat_default_gateway
|
||||||
|
|
||||||
- name: Macvlan | Install network gateway interface on Flatcar Container Linux
|
- name: Macvlan | Install network gateway interface on Flatcar Container Linux
|
||||||
template:
|
template:
|
||||||
|
@ -79,7 +79,7 @@
|
||||||
- {src: coreos-interface-macvlan.cfg, dst: output.network }
|
- {src: coreos-interface-macvlan.cfg, dst: output.network }
|
||||||
- {src: coreos-network-macvlan.cfg, dst: macvlan.network }
|
- {src: coreos-network-macvlan.cfg, dst: macvlan.network }
|
||||||
notify: Macvlan | restart network
|
notify: Macvlan | restart network
|
||||||
when: ansible_os_family in ["Flatcar Container Linux by Kinvolk"]
|
when: ansible_os_family in ["Flatcar", "Flatcar Container Linux by Kinvolk"]
|
||||||
|
|
||||||
- name: Macvlan | Install cni definition for Macvlan
|
- name: Macvlan | Install cni definition for Macvlan
|
||||||
template:
|
template:
|
||||||
|
|
|
@ -355,7 +355,7 @@
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
state: restarted
|
state: restarted
|
||||||
when:
|
when:
|
||||||
- ansible_os_family not in ["Flatcar Container Linux by Kinvolk"]
|
- ansible_os_family not in ["Flatcar", "Flatcar Container Linux by Kinvolk"]
|
||||||
- reset_restart_network
|
- reset_restart_network
|
||||||
tags:
|
tags:
|
||||||
- services
|
- services
|
||||||
|
|
|
@ -5,12 +5,12 @@
|
||||||
- name: Force binaries directory for Flatcar Container Linux by Kinvolk
|
- name: Force binaries directory for Flatcar Container Linux by Kinvolk
|
||||||
set_fact:
|
set_fact:
|
||||||
bin_dir: "/opt/bin"
|
bin_dir: "/opt/bin"
|
||||||
when: ansible_os_family in ["Flatcar Container Linux by Kinvolk"]
|
when: ansible_os_family in ["Flatcar", "Flatcar Container Linux by Kinvolk"]
|
||||||
|
|
||||||
- name: Force binaries directory for other hosts
|
- name: Force binaries directory for other hosts
|
||||||
set_fact:
|
set_fact:
|
||||||
bin_dir: "/usr/local/bin"
|
bin_dir: "/usr/local/bin"
|
||||||
when: not ansible_os_family in ["Flatcar Container Linux by Kinvolk"]
|
when: not ansible_os_family in ["Flatcar", "Flatcar Container Linux by Kinvolk"]
|
||||||
|
|
||||||
- import_role: # noqa unnamed-task
|
- import_role: # noqa unnamed-task
|
||||||
name: cluster-dump
|
name: cluster-dump
|
||||||
|
|
|
@ -5,12 +5,12 @@
|
||||||
- name: Force binaries directory for Flatcar Container Linux by Kinvolk
|
- name: Force binaries directory for Flatcar Container Linux by Kinvolk
|
||||||
set_fact:
|
set_fact:
|
||||||
bin_dir: "/opt/bin"
|
bin_dir: "/opt/bin"
|
||||||
when: ansible_os_family in ["Flatcar Container Linux by Kinvolk"]
|
when: ansible_os_family in ["Flatcar", "Flatcar Container Linux by Kinvolk"]
|
||||||
|
|
||||||
- name: Force binaries directory for other hosts
|
- name: Force binaries directory for other hosts
|
||||||
set_fact:
|
set_fact:
|
||||||
bin_dir: "/usr/local/bin"
|
bin_dir: "/usr/local/bin"
|
||||||
when: not ansible_os_family in ["Flatcar Container Linux by Kinvolk"]
|
when: not ansible_os_family in ["Flatcar", "Flatcar Container Linux by Kinvolk"]
|
||||||
|
|
||||||
- import_role: # noqa unnamed-task
|
- import_role: # noqa unnamed-task
|
||||||
name: cluster-dump
|
name: cluster-dump
|
||||||
|
|
|
@ -8,12 +8,12 @@
|
||||||
- name: Force binaries directory for Flatcar Container Linux by Kinvolk
|
- name: Force binaries directory for Flatcar Container Linux by Kinvolk
|
||||||
set_fact:
|
set_fact:
|
||||||
bin_dir: "/opt/bin"
|
bin_dir: "/opt/bin"
|
||||||
when: ansible_os_family in ["Flatcar Container Linux by Kinvolk"]
|
when: ansible_os_family in ["Flatcar", "Flatcar Container Linux by Kinvolk"]
|
||||||
|
|
||||||
- name: Force binaries directory for other hosts
|
- name: Force binaries directory for other hosts
|
||||||
set_fact:
|
set_fact:
|
||||||
bin_dir: "/usr/local/bin"
|
bin_dir: "/usr/local/bin"
|
||||||
when: not ansible_os_family in ["Flatcar Container Linux by Kinvolk"]
|
when: not ansible_os_family in ["Flatcar", "Flatcar Container Linux by Kinvolk"]
|
||||||
|
|
||||||
- name: Approve kubelet serving certificates
|
- name: Approve kubelet serving certificates
|
||||||
block:
|
block:
|
||||||
|
|
|
@ -19,12 +19,12 @@
|
||||||
- name: Force binaries directory for Container Linux by CoreOS and Flatcar
|
- name: Force binaries directory for Container Linux by CoreOS and Flatcar
|
||||||
set_fact:
|
set_fact:
|
||||||
bin_dir: "/opt/bin"
|
bin_dir: "/opt/bin"
|
||||||
when: ansible_os_family in ["Flatcar Container Linux by Kinvolk"]
|
when: ansible_os_family in ["Flatcar", "Flatcar Container Linux by Kinvolk"]
|
||||||
|
|
||||||
- name: Force binaries directory on other hosts
|
- name: Force binaries directory on other hosts
|
||||||
set_fact:
|
set_fact:
|
||||||
bin_dir: "/usr/local/bin"
|
bin_dir: "/usr/local/bin"
|
||||||
when: not ansible_os_family in ["Flatcar Container Linux by Kinvolk"]
|
when: not ansible_os_family in ["Flatcar", "Flatcar Container Linux by Kinvolk"]
|
||||||
|
|
||||||
- import_role: # noqa unnamed-task
|
- import_role: # noqa unnamed-task
|
||||||
name: cluster-dump
|
name: cluster-dump
|
||||||
|
|
Loading…
Reference in a new issue