69 lines
1.4 KiB
YAML
69 lines
1.4 KiB
YAML
- name: load os-specific values
|
|
include_vars: '{{ item }}'
|
|
with_first_found:
|
|
- '{{ ansible_distribution }}-{{ ansible_distribution_version }}.yml'
|
|
- '{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yml'
|
|
- '{{ ansible_os_family }}-{{ ansible_distribution_major_version }}.yml'
|
|
- '{{ ansible_distribution }}.yml'
|
|
- '{{ ansible_os_family }}.yml'
|
|
- defaults.yml
|
|
tags:
|
|
- always
|
|
|
|
- name: ensure legacy cri-o package is not installed
|
|
package:
|
|
name: cri-o
|
|
state: absent
|
|
when: crio_package != 'cri-o'
|
|
tags:
|
|
- install
|
|
- cleanup
|
|
|
|
- name: ensure cri-o is installed
|
|
package:
|
|
name:
|
|
- container-selinux
|
|
- '{{ crio_package }}'
|
|
- crun
|
|
state: present
|
|
tags:
|
|
- install
|
|
|
|
- name: ensure crio configuration drop-in directory exists
|
|
file:
|
|
path: /etc/crio/crio.conf.d
|
|
owner: root
|
|
group: root
|
|
mode: u=rwx,go=rx
|
|
state: directory
|
|
tags:
|
|
- config
|
|
|
|
- name: ensure cri-o is configured to use crun
|
|
copy:
|
|
src: crun.conf
|
|
dest: /etc/crio/crio.conf.d/10-crio-crun.conf
|
|
owner: root
|
|
group: root
|
|
mode: u=rw,go=r
|
|
notify:
|
|
- restart crio
|
|
tags:
|
|
- config
|
|
|
|
- name: flush handlers
|
|
meta: flush_handlers
|
|
|
|
- name: ensure cri-o service is enabled
|
|
service:
|
|
name: crio
|
|
enabled: true
|
|
tags:
|
|
- service
|
|
- name: ensure cri-o service is running
|
|
service:
|
|
name: crio
|
|
state: started
|
|
tags:
|
|
- service
|