diff --git a/contrib/vault/roles/vault/tasks/bootstrap/ca_trust.yml b/contrib/vault/roles/vault/tasks/bootstrap/ca_trust.yml index 83d4833b40428eff1203b02713da9c01f2e0831c..30e00193fd49d4807ab9ac9f90b83e48e3ca9f9d 100644 --- a/contrib/vault/roles/vault/tasks/bootstrap/ca_trust.yml +++ b/contrib/vault/roles/vault/tasks/bootstrap/ca_trust.yml @@ -13,7 +13,7 @@ /usr/local/share/ca-certificates/vault-ca.crt {%- elif ansible_os_family == "RedHat" -%} /etc/pki/ca-trust/source/anchors/vault-ca.crt - {%- elif ansible_os_family in ["Coreos", "Container Linux by CoreOS"] -%} + {%- elif ansible_os_family in ["Coreos", "Container Linux by CoreOS", "Flatcar", "Flatcar Container Linux by Kinvolk"] -%} /etc/ssl/certs/vault-ca.pem {%- endif %} @@ -25,7 +25,7 @@ - name: bootstrap/ca_trust | update ca-certificates (Debian/Ubuntu/CoreOS) command: update-ca-certificates - when: vault_ca_cert.changed and ansible_os_family in ["Debian", "CoreOS", "Coreos", "Container Linux by CoreOS"] + when: vault_ca_cert.changed and ansible_os_family in ["Debian", "CoreOS", "Coreos", "Container Linux by CoreOS", "Flatcar", "Flatcar Container Linux by Kinvolk"] - name: bootstrap/ca_trust | update ca-certificates (RedHat) command: update-ca-trust extract diff --git a/roles/bootstrap-os/tasks/bootstrap-coreos.yml b/roles/bootstrap-os/tasks/bootstrap-coreos.yml index 7347f8432250e2e07931aa90d442411e4876f24a..3be74e1f57a005bb142ef61d910d36ad9e36d500 100644 --- a/roles/bootstrap-os/tasks/bootstrap-coreos.yml +++ b/roles/bootstrap-os/tasks/bootstrap-coreos.yml @@ -10,7 +10,7 @@ tags: - facts -- name: Force binaries directory for Container Linux by CoreOS +- name: Force binaries directory for Container Linux by CoreOS and Flatcar set_fact: bin_dir: "/opt/bin" tags: diff --git a/roles/bootstrap-os/tasks/main.yml b/roles/bootstrap-os/tasks/main.yml index cb575f3725576a61ce11c366e79367a30717bdce..d35f7fd6d528bf42d85b3d184d3ceb2af287950b 100644 --- a/roles/bootstrap-os/tasks/main.yml +++ b/roles/bootstrap-os/tasks/main.yml @@ -14,7 +14,7 @@ when: '"Clear Linux OS" in os_release.stdout' - include_tasks: bootstrap-coreos.yml - when: '"CoreOS" in os_release.stdout' + when: '"CoreOS" in os_release.stdout or "Flatcar" in os_release.stdout' - include_tasks: bootstrap-debian.yml when: '"Debian" in os_release.stdout or "Ubuntu" in os_release.stdout' @@ -41,30 +41,30 @@ gather_subset: '!all' filter: ansible_* -- name: Assign inventory name to unconfigured hostnames (non-CoreOS, Suse and ClearLinux) +- name: Assign inventory name to unconfigured hostnames (non-CoreOS, non-Flatcar, Suse and ClearLinux) hostname: name: "{{ inventory_hostname }}" when: - override_system_hostname - - ansible_os_family not in ['Suse', 'Container Linux by CoreOS', 'ClearLinux'] + - ansible_os_family not in ['Suse', 'Container Linux by CoreOS', 'Flatcar Container Linux by Kinvolk', 'ClearLinux'] # (2/3) -- name: Assign inventory name to unconfigured hostnames (CoreOS, Suse and ClearLinux only) +- name: Assign inventory name to unconfigured hostnames (CoreOS, non-Flatcar, Suse and ClearLinux only) command: "hostnamectl set-hostname {{ inventory_hostname }}" register: hostname_changed changed_when: false when: - override_system_hostname - - ansible_os_family in ['Suse', 'Container Linux by CoreOS', 'ClearLinux'] + - ansible_os_family in ['Suse', 'Container Linux by CoreOS', 'Flatcar Container Linux by Kinvolk', 'ClearLinux'] # (3/3) -- name: Update hostname fact (CoreOS, Suse and ClearLinux only) +- name: Update hostname fact (CoreOS, Flatcar, Suse and ClearLinux only) setup: gather_subset: '!all' filter: ansible_hostname when: - override_system_hostname - - ansible_os_family in ['Suse', 'Container Linux by CoreOS', 'ClearLinux'] + - ansible_os_family in ['Suse', 'Flatcar Container Linux by Kinvolk', 'Container Linux by CoreOS', 'ClearLinux'] - name: "Install ceph-commmon package" package: diff --git a/roles/container-engine/docker/handlers/main.yml b/roles/container-engine/docker/handlers/main.yml index 7fadc62da22aeefe5b638439b9c143b4aa767f4a..20bbbb29a212f53c47ad7ed57866b7834c9ec25d 100644 --- a/roles/container-engine/docker/handlers/main.yml +++ b/roles/container-engine/docker/handlers/main.yml @@ -15,7 +15,7 @@ service: name: docker.socket state: restarted - when: ansible_os_family in ['CoreOS', 'Container Linux by CoreOS'] + when: ansible_os_family in ['CoreOS', 'Container Linux by CoreOS', 'Flatcar', 'Flatcar Container Linux by Kinvolk'] - name: Docker | reload docker service: diff --git a/roles/container-engine/docker/tasks/main.yml b/roles/container-engine/docker/tasks/main.yml index bd86ef0b53320d8fbd9f8c61b96fd7f89de3060b..a70a6b213417c70307e4be427b449c0b0171854d 100644 --- a/roles/container-engine/docker/tasks/main.yml +++ b/roles/container-engine/docker/tasks/main.yml @@ -43,7 +43,7 @@ docker requires a minimum kernel version of {{ docker_kernel_min_version }} on {{ ansible_distribution }}-{{ ansible_distribution_version }} - when: (not ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS", "ClearLinux"]) and (ansible_kernel is version(docker_kernel_min_version, "<")) + when: (not ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS", "Flatcar", "Flatcar Container Linux by Kinvolk", "ClearLinux"]) and (ansible_kernel is version(docker_kernel_min_version, "<")) tags: - facts @@ -60,7 +60,7 @@ retries: 4 delay: "{{ retry_stagger | d(3) }}" with_items: "{{ docker_repo_key_info.repo_keys }}" - when: not (ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS", "RedHat", "Suse", "ClearLinux"] or is_atomic) + when: not (ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS", "Flatcar", "Flatcar Container Linux by Kinvolk", "RedHat", "Suse", "ClearLinux"] or is_atomic) - name: ensure docker-ce repository is enabled action: "{{ docker_repo_info.pkg_repo }}" @@ -68,7 +68,7 @@ repo: "{{ item }}" state: present with_items: "{{ docker_repo_info.repos }}" - when: not (ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS", "RedHat", "Suse", "ClearLinux"] or is_atomic) and (docker_repo_info.repos|length > 0) + when: not (ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS", "Flatcar", "Flatcar Container Linux by Kinvolk", "RedHat", "Suse", "ClearLinux"] or is_atomic) and (docker_repo_info.repos|length > 0) - name: ensure docker-engine repository public key is installed action: "{{ dockerproject_repo_key_info.pkg_key }}" @@ -82,7 +82,7 @@ delay: "{{ retry_stagger | d(3) }}" with_items: "{{ dockerproject_repo_key_info.repo_keys }}" when: - - not (ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS", "RedHat", "Suse", "ClearLinux"] or is_atomic) + - not (ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS", "Flatcar", "Flatcar Container Linux by Kinvolk", "RedHat", "Suse", "ClearLinux"] or is_atomic) - use_docker_engine is defined and use_docker_engine - name: ensure docker-engine repository is enabled @@ -93,7 +93,7 @@ with_items: "{{ dockerproject_repo_info.repos }}" when: - use_docker_engine is defined and use_docker_engine - - not (ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS", "RedHat", "Suse", "ClearLinux"] or is_atomic) and (dockerproject_repo_info.repos|length > 0) + - not (ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS", "Flatcar", "Flatcar Container Linux by Kinvolk", "RedHat", "Suse", "ClearLinux"] or is_atomic) and (dockerproject_repo_info.repos|length > 0) - name: Configure docker repository on Fedora template: @@ -162,7 +162,7 @@ delay: "{{ retry_stagger | d(3) }}" with_items: "{{ docker_package_info.pkgs }}" notify: restart docker - when: not (ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS", "ClearLinux"] or is_atomic) and (docker_package_info.pkgs|length > 0) + when: not (ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS", "Flatcar", "Flatcar Container Linux by Kinvolk", "ClearLinux"] or is_atomic) and (docker_package_info.pkgs|length > 0) ignore_errors: true - name: Ensure docker packages are installed diff --git a/roles/container-engine/docker/tasks/systemd.yml b/roles/container-engine/docker/tasks/systemd.yml index b73a51bd42224fe1d4fa497b0cc4898f8b4c8d88..ec97706bf6dc7c84f47de8cd477d49dacc4d1191 100644 --- a/roles/container-engine/docker/tasks/systemd.yml +++ b/roles/container-engine/docker/tasks/systemd.yml @@ -24,7 +24,7 @@ dest: /etc/systemd/system/docker.service register: docker_service_file notify: restart docker - when: not (ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS"] or is_atomic) + when: not (ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS", "Flatcar", "Flatcar Container Linux by Kinvolk"] or is_atomic) - name: Write docker options systemd drop-in template: diff --git a/roles/download/defaults/main.yml b/roles/download/defaults/main.yml index c6dff49a07c2435ab775c5c7eec643816e30159a..1783591abba963c7c499cc274658a08f069ffa78 100644 --- a/roles/download/defaults/main.yml +++ b/roles/download/defaults/main.yml @@ -783,7 +783,7 @@ downloads: - k8s-cluster install_socat: - enabled: "{{ ansible_os_family in ['CoreOS', 'Container Linux by CoreOS'] }}" + enabled: "{{ ansible_os_family in ['CoreOS', 'Container Linux by CoreOS', 'Flatcar', 'Flatcar Container Linux by Kinvolk'] }}" container: true repo: "{{ install_socat_image_repo }}" tag: "{{ install_socat_image_tag }}" diff --git a/roles/download/tasks/download_container.yml b/roles/download/tasks/download_container.yml index d19a8fe62c7a50cbdd53e0ce59e4c33a053790e5..b71807f1f9fa343bd2f0947ef9ead2cff7014878 100644 --- a/roles/download/tasks/download_container.yml +++ b/roles/download/tasks/download_container.yml @@ -50,7 +50,7 @@ - download_force_cache - image_is_cached - not download_localhost - - ansible_os_family not in ["CoreOS", "Coreos", "Container Linux by CoreOS"] + - ansible_os_family not in ["CoreOS", "Coreos", "Container Linux by CoreOS", "Flatcar", "Flatcar Container Linux by Kinvolk"] - name: download_container | Load image into docker shell: "{{ docker_bin_dir }}/docker load < {{ image_path_cached if download_localhost else image_path_final }}" @@ -62,7 +62,7 @@ when: - download_force_cache - image_is_cached - - ansible_os_family not in ["CoreOS", "Coreos", "Container Linux by CoreOS"] + - ansible_os_family not in ["CoreOS", "Coreos", "Container Linux by CoreOS", "Flatcar", "Flatcar Container Linux by Kinvolk"] - name: download_container | Prepare container download include_tasks: check_pull_required.yml @@ -109,7 +109,7 @@ when: - download_force_cache - not image_is_cached or (image_changed | default(true)) - - ansible_os_family not in ["CoreOS", "Coreos", "Container Linux by CoreOS"] + - ansible_os_family not in ["CoreOS", "Coreos", "Container Linux by CoreOS", "Flatcar", "Flatcar Container Linux by Kinvolk"] - name: download_container | Copy image to ansible host cache synchronize: @@ -123,7 +123,7 @@ - not download_localhost - download_delegate == inventory_hostname - not image_is_cached or (image_changed | default(true)) - - ansible_os_family not in ["CoreOS", "Coreos", "Container Linux by CoreOS"] + - ansible_os_family not in ["CoreOS", "Coreos", "Container Linux by CoreOS", "Flatcar", "Flatcar Container Linux by Kinvolk"] - name: download_container | Remove container image from cache file: @@ -131,7 +131,7 @@ path: "{{ image_path_final }}" when: - not download_keep_remote_cache - - ansible_os_family not in ["CoreOS", "Coreos", "Container Linux by CoreOS"] + - ansible_os_family not in ["CoreOS", "Coreos", "Container Linux by CoreOS", "Flatcar", "Flatcar Container Linux by Kinvolk"] tags: - download diff --git a/roles/download/tasks/download_file.yml b/roles/download/tasks/download_file.yml index 1c02f8084f1589bce1471f6973b7dfb29964d4c3..cf7319018edb3d7008edc4fda95e62cf57046667 100644 --- a/roles/download/tasks/download_file.yml +++ b/roles/download/tasks/download_file.yml @@ -67,7 +67,7 @@ when: - download_force_cache - file_is_cached - - ansible_os_family not in ["CoreOS", "Coreos", "Container Linux by CoreOS"] + - ansible_os_family not in ["CoreOS", "Coreos", "Container Linux by CoreOS", "Flatcar", "Flatcar Container Linux by Kinvolk"] - name: download_file | Set mode and owner file: @@ -78,7 +78,7 @@ when: - download_force_cache - file_is_cached - - ansible_os_family not in ["CoreOS", "Coreos", "Container Linux by CoreOS"] + - ansible_os_family not in ["CoreOS", "Coreos", "Container Linux by CoreOS", "Flatcar", "Flatcar Container Linux by Kinvolk"] # This must always be called, to check if the checksum matches. On no-match the file is re-downloaded. - name: download_file | Download item @@ -116,7 +116,7 @@ - not file_is_cached or get_url_result.changed - download_delegate == inventory_hostname - not (download_run_once and download_delegate == 'localhost') - - ansible_os_family not in ["CoreOS", "Coreos", "Container Linux by CoreOS"] + - ansible_os_family not in ["CoreOS", "Coreos", "Container Linux by CoreOS", "Flatcar", "Flatcar Container Linux by Kinvolk"] tags: - download diff --git a/roles/download/tasks/prep_download.yml b/roles/download/tasks/prep_download.yml index 388ae7029c530e97c7f7e6d188d09a3e7f7769c6..22a42fb0ae423d3fe0981ed82bb9ea9662d0d46d 100644 --- a/roles/download/tasks/prep_download.yml +++ b/roles/download/tasks/prep_download.yml @@ -27,7 +27,7 @@ mode: 0755 owner: "{{ ansible_ssh_user | default(ansible_user_id) }}" when: - - ansible_os_family not in ["CoreOS", "Coreos", "Container Linux by CoreOS"] + - ansible_os_family not in ["CoreOS", "Coreos", "Container Linux by CoreOS", "Flatcar", "Flatcar Container Linux by Kinvolk"] - name: prep_download | Create local cache for files and images file: diff --git a/roles/download/tasks/sync_container.yml b/roles/download/tasks/sync_container.yml index 2802b461bdc48a6ddb5291dc61bb8974d0dc3339..a84a9ef27c6108e29864975d467342ef11242830 100644 --- a/roles/download/tasks/sync_container.yml +++ b/roles/download/tasks/sync_container.yml @@ -18,12 +18,12 @@ retries: 4 delay: "{{ retry_stagger | random + 3 }}" when: - - ansible_os_family not in ["CoreOS", "Coreos", "Container Linux by CoreOS"] + - ansible_os_family not in ["CoreOS", "Coreos", "Container Linux by CoreOS", "Flatcar", "Flatcar Container Linux by Kinvolk"] - name: sync_container | Load container image into docker shell: "{{ docker_bin_dir }}/docker load < {{ image_path_final }}" when: - - ansible_os_family not in ["CoreOS", "Coreos", "Container Linux by CoreOS"] + - ansible_os_family not in ["CoreOS", "Coreos", "Container Linux by CoreOS", "Flatcar", "Flatcar Container Linux by Kinvolk"] - name: sync_container | Remove container image from cache file: @@ -31,7 +31,7 @@ path: "{{ image_path_final }}" when: - not download_keep_remote_cache - - ansible_os_family not in ["CoreOS", "Coreos", "Container Linux by CoreOS"] + - ansible_os_family not in ["CoreOS", "Coreos", "Container Linux by CoreOS", "Flatcar", "Flatcar Container Linux by Kinvolk"] tags: - upload diff --git a/roles/download/tasks/sync_file.yml b/roles/download/tasks/sync_file.yml index 43dd97d2aaa977c4fa991394c7299be3f6b682e5..acc7ca0103f430cd9e1f02973af0eefa418e2051 100644 --- a/roles/download/tasks/sync_file.yml +++ b/roles/download/tasks/sync_file.yml @@ -30,7 +30,7 @@ retries: 4 delay: "{{ retry_stagger | random + 3 }}" when: - - ansible_os_family not in ["CoreOS", "Coreos", "Container Linux by CoreOS"] + - ansible_os_family not in ["CoreOS", "Coreos", "Container Linux by CoreOS", "Flatcar", "Flatcar Container Linux by Kinvolk"] - name: sync_file | Set mode and owner file: diff --git a/roles/etcd/meta/main.yml b/roles/etcd/meta/main.yml index a5d06a603536196820a1e9e453167992c6b03d21..fa43c6fc59df105262b39a6659c3f9638cd917f5 100644 --- a/roles/etcd/meta/main.yml +++ b/roles/etcd/meta/main.yml @@ -2,7 +2,7 @@ dependencies: - role: adduser user: "{{ addusers.etcd }}" - when: not (ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS", "ClearLinux"] or is_atomic) + when: not (ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS", "Flatcar", "Flatcar Container Linux by Kinvolk", "ClearLinux"] or is_atomic) - role: adduser user: "{{ addusers.kube }}" - when: not (ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS", "ClearLinux"] or is_atomic) + when: not (ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS", "Flatcar", "Flatcar Container Linux by Kinvolk", "ClearLinux"] or is_atomic) diff --git a/roles/etcd/tasks/upd_ca_trust.yml b/roles/etcd/tasks/upd_ca_trust.yml index 3936a8fb674535951fc40b0afdcaed63799e39be..1f9da04f26070eb46fedf96d0069924576a3fd63 100644 --- a/roles/etcd/tasks/upd_ca_trust.yml +++ b/roles/etcd/tasks/upd_ca_trust.yml @@ -6,7 +6,7 @@ /usr/local/share/ca-certificates/etcd-ca.crt {%- elif ansible_os_family == "RedHat" -%} /etc/pki/ca-trust/source/anchors/etcd-ca.crt - {%- elif ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS"] -%} + {%- elif ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS", "Flatcar", "Flatcar Container Linux by Kinvolk"] -%} /etc/ssl/certs/etcd-ca.pem {%- elif ansible_os_family == "Suse" -%} /etc/pki/trust/anchors/etcd-ca.pem @@ -25,7 +25,7 @@ - name: Gen_certs | update ca-certificates (Debian/Ubuntu/SUSE/Container Linux by CoreOS) command: update-ca-certificates - when: etcd_ca_cert.changed and ansible_os_family in ["Debian", "CoreOS", "Coreos", "Container Linux by CoreOS", "Suse"] + when: etcd_ca_cert.changed and ansible_os_family in ["Debian", "CoreOS", "Coreos", "Container Linux by CoreOS", "Flatcar", "Flatcar Container Linux by Kinvolk", "Suse"] - name: Gen_certs | update ca-certificates (RedHat) command: update-ca-trust extract diff --git a/roles/kubernetes-apps/external_provisioner/local_volume_provisioner/README.md b/roles/kubernetes-apps/external_provisioner/local_volume_provisioner/README.md index 334c9dae39144357c93067f9262a76bea062cb56..e732d1b5b397fe5886d390a4d101dbf082193e8c 100644 --- a/roles/kubernetes-apps/external_provisioner/local_volume_provisioner/README.md +++ b/roles/kubernetes-apps/external_provisioner/local_volume_provisioner/README.md @@ -118,7 +118,7 @@ delete the daemonset pod on the relevant host after creating volumes. The pod will be recreated and read the size correctly. Make sure to make any mounts persist via /etc/fstab or with systemd mounts (for -CoreOS/Container Linux). Pods with persistent volume claims will not be +CoreOS/Container Linux and Flatcar). Pods with persistent volume claims will not be able to start if the mounts become unavailable. Further reading diff --git a/roles/kubernetes-apps/helm/tasks/install_host.yml b/roles/kubernetes-apps/helm/tasks/install_host.yml index b248d2ee2ee78a9387b0eba0e51c40889e471989..cc9a99c79bfc0d9f66f4107cdbf068a4fdd6947a 100644 --- a/roles/kubernetes-apps/helm/tasks/install_host.yml +++ b/roles/kubernetes-apps/helm/tasks/install_host.yml @@ -35,8 +35,8 @@ retries: 4 delay: "{{ retry_stagger | random + 3 }}" -- name: Helm | Copy socat wrapper for Container Linux +- name: Helm | Copy socat wrapper for Container Linux and Flatcat command: "{{ docker_bin_dir }}/docker run --rm -v {{ bin_dir }}:/opt/bin {{ install_socat_image_repo }}:{{ install_socat_image_tag }}" args: creates: "{{ bin_dir }}/socat" - when: ansible_os_family in ['CoreOS', 'Container Linux by CoreOS'] + when: ansible_os_family in ['CoreOS', 'Container Linux by CoreOS', 'Flatcar', 'Flatcar Container Linux by Kinvolk'] diff --git a/roles/kubernetes-apps/helm/tasks/main.yml b/roles/kubernetes-apps/helm/tasks/main.yml index db74c0b107f25edec2ca38162f794f23b042a266..7ea1c8bdb789175f614ece7a8a559488a2f02435 100644 --- a/roles/kubernetes-apps/helm/tasks/main.yml +++ b/roles/kubernetes-apps/helm/tasks/main.yml @@ -113,4 +113,4 @@ shell: "umask 022 && {{ bin_dir }}/helm completion bash >/etc/bash_completion.d/helm.sh" when: - ((helm_container is defined and helm_container.changed) or (helm_task_result is defined and helm_task_result.changed)) - - not ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS"] + - not ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS", "Flatcar", "Flatcar Container Linux by Kinvolk"] diff --git a/roles/kubernetes/node/tasks/install.yml b/roles/kubernetes/node/tasks/install.yml index 76766115c6677c3eff73a60756bd48a91fa206a8..dddefb7a3c03a70301d98159854eb90322c92232 100644 --- a/roles/kubernetes/node/tasks/install.yml +++ b/roles/kubernetes/node/tasks/install.yml @@ -50,4 +50,4 @@ command: "{{ docker_bin_dir }}/docker run --rm -v {{ bin_dir }}:/opt/bin {{ install_socat_image_repo }}:{{ install_socat_image_tag }}" args: creates: "{{ bin_dir }}/socat" - when: ansible_os_family in ['CoreOS', 'Container Linux by CoreOS'] + when: ansible_os_family in ['CoreOS', 'Container Linux by CoreOS', 'Flatcar', 'Flatcar Container Linux by Kinvolk'] diff --git a/roles/kubernetes/preinstall/handlers/main.yml b/roles/kubernetes/preinstall/handlers/main.yml index e13fa5a8bfcf992f770ee063aace5c4940afd0d1..8417a3c21840c73016ea1f795cc32a365ecdc3d8 100644 --- a/roles/kubernetes/preinstall/handlers/main.yml +++ b/roles/kubernetes/preinstall/handlers/main.yml @@ -9,18 +9,18 @@ - Preinstall | restart kube-controller-manager crio/containerd - Preinstall | restart kube-apiserver docker - Preinstall | restart kube-apiserver crio/containerd - when: not ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS"] + when: not ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS", "Flatcar", "Flatcar Container Linux by Kinvolk"] -- name: Preinstall | update resolvconf for Container Linux by CoreOS +- name: Preinstall | update resolvconf for Container Linux by CoreOS and Flatcar command: /bin/true notify: - Preinstall | apply resolvconf cloud-init - Preinstall | reload kubelet - when: ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS"] + when: ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS", "Flatcar", "Flatcar Container Linux by Kinvolk"] - name: Preinstall | apply resolvconf cloud-init command: /usr/bin/coreos-cloudinit --from-file {{ resolveconf_cloud_init_conf }} - when: ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS"] + when: ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS", "Flatcar", "Flatcar Container Linux by Kinvolk"] - name: Preinstall | reload kubelet service: diff --git a/roles/kubernetes/preinstall/tasks/0020-verify-settings.yml b/roles/kubernetes/preinstall/tasks/0020-verify-settings.yml index a5bb05ae1a28637f2dd1a2c9ced1febe5c61b7a7..44bfae7490b95d1c8e0ab5a68f3c491283274ac4 100644 --- a/roles/kubernetes/preinstall/tasks/0020-verify-settings.yml +++ b/roles/kubernetes/preinstall/tasks/0020-verify-settings.yml @@ -16,7 +16,7 @@ - name: Stop if unknown OS assert: - that: ansible_os_family in ['RedHat', 'CentOS', 'Fedora', 'Ubuntu', 'Debian', 'CoreOS', 'Coreos', 'Container Linux by CoreOS', 'Suse', 'ClearLinux', 'OracleLinux'] + that: ansible_os_family in ['RedHat', 'CentOS', 'Fedora', 'Ubuntu', 'Debian', 'CoreOS', 'Coreos', 'Container Linux by CoreOS', 'Flatcar', 'Flatcar Container Linux by Kinvolk', 'Suse', 'ClearLinux', 'OracleLinux'] msg: "{{ ansible_os_family }} is not a known OS" ignore_errors: "{{ ignore_assert_errors }}" diff --git a/roles/kubernetes/preinstall/tasks/0040-set_facts.yml b/roles/kubernetes/preinstall/tasks/0040-set_facts.yml index 8a603712a78b28061d19c1fa4e464fbe29f6ea35..11a52a2d0945b8b87859ef306a40a1d85a22f884 100644 --- a/roles/kubernetes/preinstall/tasks/0040-set_facts.yml +++ b/roles/kubernetes/preinstall/tasks/0040-set_facts.yml @@ -15,10 +15,10 @@ {{ ansible_architecture }} {% endif %} -- name: Force binaries directory for Container Linux by CoreOS +- name: Force binaries directory for Container Linux by CoreOS and Flatcar set_fact: bin_dir: "/opt/bin" - when: ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS"] + when: ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS", "Flatcar", "Flatcar Container Linux by Kinvolk"] tags: - facts @@ -85,12 +85,12 @@ {%- if resolvconf|bool -%}/etc/resolvconf/resolv.conf.d/base{%- endif -%} head: >- {%- if resolvconf|bool -%}/etc/resolvconf/resolv.conf.d/head{%- endif -%} - when: not ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS"] + when: not ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS", "Flatcar", "Flatcar Container Linux by Kinvolk"] - name: target temporary resolvconf cloud init file (Container Linux by CoreOS) set_fact: resolvconffile: /tmp/resolveconf_cloud_init_conf - when: ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS"] + when: ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS", "Flatcar", "Flatcar Container Linux by Kinvolk"] - name: check if /etc/dhclient.conf exists stat: diff --git a/roles/kubernetes/preinstall/tasks/0060-resolvconf.yml b/roles/kubernetes/preinstall/tasks/0060-resolvconf.yml index cef9aa754adfc1157eb9507f85e7e5e8ede6a00c..19194edb539af42e50139e9de87ee0f4fe119620 100644 --- a/roles/kubernetes/preinstall/tasks/0060-resolvconf.yml +++ b/roles/kubernetes/preinstall/tasks/0060-resolvconf.yml @@ -1,7 +1,7 @@ --- - name: create temporary resolveconf cloud init file command: cp -f /etc/resolv.conf "{{ resolvconffile }}" - when: ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS"] + when: ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS", "Flatcar", "Flatcar Container Linux by Kinvolk"] - name: Add domain/search/nameservers/options to resolv.conf blockinfile: @@ -47,7 +47,7 @@ - name: get temporary resolveconf cloud init file content command: cat {{ resolvconffile }} register: cloud_config - when: ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS"] + when: ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS", "Flatcar", "Flatcar Container Linux by Kinvolk"] - name: persist resolvconf cloud init file template: @@ -56,4 +56,4 @@ owner: root mode: 0644 notify: Preinstall | update resolvconf for Container Linux by CoreOS - when: ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS"] + when: ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS", "Flatcar", "Flatcar Container Linux by Kinvolk"] diff --git a/roles/kubernetes/preinstall/tasks/0070-system-packages.yml b/roles/kubernetes/preinstall/tasks/0070-system-packages.yml index 62d56cebcbd9c5e862f0584a37d8ee92ecc9436d..59f15342642fdb1294688c661ca07ff5c16646c1 100644 --- a/roles/kubernetes/preinstall/tasks/0070-system-packages.yml +++ b/roles/kubernetes/preinstall/tasks/0070-system-packages.yml @@ -79,7 +79,7 @@ until: pkgs_task_result is succeeded retries: 4 delay: "{{ retry_stagger | random + 3 }}" - when: not (ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS", "ClearLinux"] or is_atomic) + when: not (ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS", "Flatcar", "Flatcar Container Linux by Kinvolk", "ClearLinux"] or is_atomic) tags: - bootstrap-os diff --git a/roles/kubernetes/preinstall/tasks/0080-system-configurations.yml b/roles/kubernetes/preinstall/tasks/0080-system-configurations.yml index 73c82104331efac79d53295274536136ce93ee3c..7495649c627575a106772587fdb918328dce64e3 100644 --- a/roles/kubernetes/preinstall/tasks/0080-system-configurations.yml +++ b/roles/kubernetes/preinstall/tasks/0080-system-configurations.yml @@ -28,7 +28,7 @@ backup: yes when: - disable_ipv6_dns - - not ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS"] + - not ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS", "Flatcar", "Flatcar Container Linux by Kinvolk"] tags: - bootstrap-os diff --git a/roles/kubernetes/preinstall/tasks/main.yml b/roles/kubernetes/preinstall/tasks/main.yml index dc41e78cdb4f4a1b4b67880f6a871fe385e54ef7..932f99deeb599943bf4dd642108ee4234bc1e68a 100644 --- a/roles/kubernetes/preinstall/tasks/main.yml +++ b/roles/kubernetes/preinstall/tasks/main.yml @@ -69,7 +69,7 @@ when: - dns_mode != 'none' - resolvconf_mode == 'host_resolvconf' - - not ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS"] + - not ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS", "Flatcar", "Flatcar Container Linux by Kinvolk"] tags: - bootstrap-os - resolvconf @@ -78,7 +78,7 @@ when: - dns_mode != 'none' - resolvconf_mode != 'host_resolvconf' - - not ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS"] + - not ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS", "Flatcar", "Flatcar Container Linux by Kinvolk"] tags: - bootstrap-os - resolvconf diff --git a/roles/kubespray-defaults/defaults/main.yaml b/roles/kubespray-defaults/defaults/main.yaml index 689bef9d14ce9166fe4047e4412cfcf4ffa95044..54ecd2dfd933a977af944266a11c3bbb5efe9f53 100644 --- a/roles/kubespray-defaults/defaults/main.yaml +++ b/roles/kubespray-defaults/defaults/main.yaml @@ -419,7 +419,7 @@ proxy_env: ssl_ca_dirs: >- [ - {% if ansible_os_family in ['CoreOS', 'Container Linux by CoreOS'] -%} + {% if ansible_os_family in ['CoreOS', 'Container Linux by CoreOS', 'Flatcar', 'Flatcar Container Linux by Kinvolk'] -%} '/usr/share/ca-certificates', {% elif ansible_os_family == 'RedHat' -%} '/etc/pki/tls', diff --git a/roles/network_plugin/macvlan/handlers/main.yml b/roles/network_plugin/macvlan/handlers/main.yml index 00c8682d4da19814e6f8d3d8de0abeb8142091b0..37b7880233f49c5cb9793b63fc87ed6db61a6c84 100644 --- a/roles/network_plugin/macvlan/handlers/main.yml +++ b/roles/network_plugin/macvlan/handlers/main.yml @@ -3,7 +3,7 @@ command: /bin/true notify: - Macvlan | reload network - when: not ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS"] + when: not ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS", "Flatcar", "Flatcar Container Linux by Kinvolk"] - name: Macvlan | reload network service: @@ -16,4 +16,4 @@ networking {%- endif %} state: restarted - when: not ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS"] and kube_network_plugin not in ['canal', 'calico'] + when: not ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS", "Flatcar", "Flatcar Container Linux by Kinvolk"] and kube_network_plugin not in ['canal', 'calico'] diff --git a/roles/network_plugin/macvlan/tasks/main.yml b/roles/network_plugin/macvlan/tasks/main.yml index bb2762a79737261d6b9c3e92a863edc34805776e..b0515089e4b4693210a1124a659d79a116bb7052 100644 --- a/roles/network_plugin/macvlan/tasks/main.yml +++ b/roles/network_plugin/macvlan/tasks/main.yml @@ -75,14 +75,14 @@ template: src: coreos-service-nat_ouside.j2 dest: /etc/systemd/system/enable_nat_ouside.service - when: ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS"] and enable_nat_default_gateway + when: ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS", "Flatcar", "Flatcar Container Linux by Kinvolk"] and enable_nat_default_gateway - name: Macvlan | Enable service nat via gateway on coreos command: "{{ item }}" with_items: - systemctl daemon-reload - systemctl enable enable_nat_ouside.service - when: ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS"] and enable_nat_default_gateway + when: ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS", "Flatcar", "Flatcar Container Linux by Kinvolk"] and enable_nat_default_gateway - name: Macvlan | Install network gateway interface on coreos template: @@ -93,7 +93,7 @@ - {src: coreos-interface-macvlan.cfg, dst: output.network } - {src: coreos-network-macvlan.cfg, dst: macvlan.network } notify: Macvlan | restart network - when: ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS"] + when: ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS", "Flatcar", "Flatcar Container Linux by Kinvolk"] - name: Macvlan | Install cni definition for Macvlan template: diff --git a/roles/reset/tasks/main.yml b/roles/reset/tasks/main.yml index 8c516a59737d02377c74461c25b6b9d80fcf598a..43d8dc10f979de050fd6632af18b7ca980c339af 100644 --- a/roles/reset/tasks/main.yml +++ b/roles/reset/tasks/main.yml @@ -302,7 +302,7 @@ {%- endif %} state: restarted when: - - ansible_os_family not in ["CoreOS", "Coreos", "Container Linux by CoreOS"] + - ansible_os_family not in ["CoreOS", "Coreos", "Container Linux by CoreOS", "Flatcar", "Flatcar Container Linux by Kinvolk"] - reset_restart_network tags: - services diff --git a/tests/testcases/015_check-pods-running.yml b/tests/testcases/015_check-pods-running.yml index 8ef54ea67834b35098db32ae7f391f760a459ac6..3c21aca57da765d5d2427602c328ed6575c0760f 100644 --- a/tests/testcases/015_check-pods-running.yml +++ b/tests/testcases/015_check-pods-running.yml @@ -2,15 +2,15 @@ - hosts: kube-master[0] tasks: - - name: Force binaries directory for Container Linux by CoreOS + - name: Force binaries directory for Container Linux by CoreOS and Flatcar set_fact: bin_dir: "/opt/bin" - when: ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS"] + when: ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS", "Flatcar", "Flatcar Container Linux by Kinvolk"] - name: Force binaries directory for other hosts set_fact: bin_dir: "/usr/local/bin" - when: not ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS"] + when: not ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS", "Flatcar", "Flatcar Container Linux by Kinvolk"] - name: Check kubectl output shell: "{{ bin_dir }}/kubectl get pods --all-namespaces -owide" diff --git a/tests/testcases/030_check-network.yml b/tests/testcases/030_check-network.yml index aa56e82f56720b6caef575f9353c7456e750a1f9..064ea12e0a0983a8257e6a37a6d10b058d5c8dee 100644 --- a/tests/testcases/030_check-network.yml +++ b/tests/testcases/030_check-network.yml @@ -5,15 +5,15 @@ test_image_tag: latest tasks: - - name: Force binaries directory for Container Linux by CoreOS + - name: Force binaries directory for Container Linux by CoreOS and Flatcar set_fact: bin_dir: "/opt/bin" - when: ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS"] + when: ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS", "Flatcar", "Flatcar Container Linux by Kinvolk"] - name: Force binaries directory for other hosts set_fact: bin_dir: "/usr/local/bin" - when: not ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS"] + when: not ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS", "Flatcar", "Flatcar Container Linux by Kinvolk"] - name: Create test namespace shell: "{{ bin_dir }}/kubectl create namespace test" diff --git a/tests/testcases/040_check-network-adv.yml b/tests/testcases/040_check-network-adv.yml index 8f6da7a546bbb49ee220653fbc5b5b517f65fbce..88859666cd503a79aebf9627dc10e385f8e7f47c 100644 --- a/tests/testcases/040_check-network-adv.yml +++ b/tests/testcases/040_check-network-adv.yml @@ -14,15 +14,15 @@ netchecker_port: 31081 tasks: - - name: Force binaries directory for Container Linux by CoreOS + - name: Force binaries directory for Container Linux by CoreOS and Flatcar set_fact: bin_dir: "/opt/bin" - when: ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS"] + when: ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS", "Flatcar", "Flatcar Container Linux by Kinvolk"] - name: Force binaries directory on other hosts set_fact: bin_dir: "/usr/local/bin" - when: not ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS"] + when: not ansible_os_family in ["CoreOS", "Coreos", "Container Linux by CoreOS", "Flatcar", "Flatcar Container Linux by Kinvolk"] - name: Wait for netchecker server shell: "{{ bin_dir }}/kubectl get pods -o wide --namespace {{ netcheck_namespace }} | grep ^netchecker-server"