Replace injected Ansible fact variables in container-engine role (#13296)

This commit is contained in:
Nikhil Kumar
2026-06-16 08:51:24 +05:30
committed by GitHub
parent a76a475a5b
commit e0add9ee0d
21 changed files with 322 additions and 320 deletions

View File

@@ -28,7 +28,7 @@
- name: Cri-o | special handling for amazon linux
import_tasks: "setup-amazon.yaml"
when: ansible_distribution in ["Amazon"]
when: ansible_facts['distribution'] in ["Amazon"]
- name: Cri-o | build a list of crio runtimes with Katacontainers runtimes
set_fact:
@@ -189,7 +189,7 @@
dest: /etc/containers/mounts.conf
mode: "0644"
when:
- ansible_os_family == 'RedHat'
- ansible_facts['os_family'] == 'RedHat'
notify: Restart crio
- name: Cri-o | create directory for oci hooks
@@ -220,7 +220,9 @@
dest: /etc/containers/storage.conf
section: storage.options.overlay
option: mountopt
value: '{{ ''"nodev"'' if ansible_kernel is version(("4.18" if ansible_os_family == "RedHat" else "4.19"), "<") else ''"nodev,metacopy=on"'' }}'
value: >-
{{ '"nodev"' if ansible_facts['kernel'] is version(('4.18' if ansible_facts['os_family'] == 'RedHat' else '4.19'), '<')
else '"nodev,metacopy=on"' }}
mode: "0644"
- name: Cri-o | create directory registries configs