This playbook installs CRI-O and ensures the runtime service is active.
- name: Install CRI-O
hosts: crio
become: true
tasks:
- name: Install CRI-O on Debian family
ansible.builtin.apt:
update_cache: true
name: cri-o
state: present
when: ansible_os_family == "Debian"
- name: Install CRI-O on RHEL family
ansible.builtin.dnf:
name: cri-o
state: present
when: ansible_os_family == "RedHat"
- name: Enable and start crio
ansible.builtin.systemd:
name: crio
enabled: true
state: started
- name: Verify crio version
ansible.builtin.command: crio --version
changed_when: false