remove atomic support because reached end of live (#5783)

This commit is contained in:
spaced
2020-03-17 22:31:27 +01:00
committed by GitHub
parent 820d8e6ce6
commit 8ce5a9dd19
14 changed files with 27 additions and 87 deletions

View File

@@ -12,7 +12,6 @@
with_items: "{{ containerd_repo_key_info.repo_keys }}"
when:
- ansible_os_family in ['Ubuntu', 'Debian']
- not is_atomic
- name: ensure containerd repository is enabled
action: "{{ containerd_repo_info.pkg_repo }}"
@@ -22,7 +21,6 @@
with_items: "{{ containerd_repo_info.repos }}"
when:
- ansible_os_family in ['Ubuntu', 'Debian']
- not is_atomic
- containerd_repo_info.repos|length > 0
# This is required to ensure any apt upgrade will not break kubernetes
@@ -34,25 +32,24 @@
mode: 0644
when:
- ansible_os_family in ['Ubuntu', 'Debian']
- not is_atomic
- name: Configure containerd repository on Fedora
template:
src: "fedora_containerd.repo.j2"
dest: "{{ yum_repo_dir }}/containerd.repo"
when: ansible_distribution == "Fedora" and not is_atomic
when: ansible_distribution == "Fedora"
- name: Configure containerd repository on RedHat/CentOS
template:
src: "rh_containerd.repo.j2"
dest: "{{ yum_repo_dir }}/containerd.repo"
when: ansible_distribution in ["CentOS","RedHat"] and not is_atomic
when: ansible_distribution in ["CentOS","RedHat"]
- name: check if container-selinux is available
yum:
list: "container-selinux"
register: yum_result
when: ansible_distribution in ["CentOS","RedHat"] and not is_atomic
when: ansible_distribution in ["CentOS","RedHat"]
- name: Configure extras repository on RedHat/CentOS if container-selinux is not available in current repos
yum_repository:
@@ -66,7 +63,7 @@
keepcache: "{{ containerd_rpm_keepcache | default('1') }}"
proxy: " {{ http_proxy | default('_none_') }}"
when:
- ansible_distribution in ["CentOS","RedHat"] and not is_atomic
- ansible_distribution in ["CentOS","RedHat"]
- yum_result.results | length == 0
- name: Copy yum.conf for editing
@@ -74,7 +71,7 @@
src: "{{ yum_conf }}"
dest: "{{ containerd_yum_conf }}"
remote_src: yes
when: ansible_distribution in ["CentOS","RedHat"] and not is_atomic
when: ansible_distribution in ["CentOS","RedHat"]
- name: Edit copy of yum.conf to set obsoletes=0
lineinfile:
@@ -82,4 +79,4 @@
state: present
regexp: '^obsoletes='
line: 'obsoletes=0'
when: ansible_distribution in ["CentOS","RedHat"] and not is_atomic
when: ansible_distribution in ["CentOS","RedHat"]

View File

@@ -1,4 +1,14 @@
---
- name: check if fedora coreos
stat:
path: /run/ostree-booted
register: ostree
- name: set is_ostree
set_fact:
is_ostree: "{{ ostree.stat.exists }}"
- name: Fail containerd setup if distribution is not supported
fail:
msg: "{{ ansible_distribution }} is not supported by containerd."
@@ -25,6 +35,7 @@
- facts
- include_tasks: containerd_repo.yml
when: not is_ostree
- name: Create containerd service systemd directory if it doesn't exist
file:
@@ -63,7 +74,7 @@
mode: 0644
when:
- ansible_os_family in ['Ubuntu', 'Debian']
- not is_atomic
- not is_ostree
- name: ensure containerd packages are installed
action: "{{ containerd_package_info.pkg_mgr }}"
@@ -80,7 +91,7 @@
with_items: "{{ containerd_package_info.pkgs }}"
notify: restart containerd
when:
- not is_atomic
- not is_ostree
- containerd_package_info.pkgs|length > 0
ignore_errors: true
@@ -101,7 +112,7 @@
delay: "{{ retry_stagger | d(3) }}"
notify: restart containerd
when:
- not is_atomic
- not is_ostree
- not runc_stat.stat.exists
- include_tasks: crictl.yml

View File

@@ -1,6 +1,6 @@
---
- name: check if atomic host or fedora coreos
- name: check if fedora coreos
stat:
path: /run/ostree-booted
register: ostree

View File

@@ -1,5 +1,5 @@
---
- name: check if atomic host or fedora coreos
- name: check if fedora coreos
stat:
path: /run/ostree-booted
register: ostree