From de247c5544c38047aa5e6a967183cdadb2270d9e Mon Sep 17 00:00:00 2001 From: Niko Wenselowski Date: Tue, 27 Jun 2023 09:52:38 +0200 Subject: [PATCH] Add support for non-RedHat OSes --- roles/gitlab_runner/tasks/podman.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/roles/gitlab_runner/tasks/podman.yml b/roles/gitlab_runner/tasks/podman.yml index a10ffab..ed055ad 100644 --- a/roles/gitlab_runner/tasks/podman.yml +++ b/roles/gitlab_runner/tasks/podman.yml @@ -1,11 +1,19 @@ --- -- name: "Install Podman and dependencies" +- name: "Install Podman and dependencies (RedHat family)" + when: ansible_facts['os_family'] == "RedHat" become: yes dnf: name: - podman - python3-libselinux +- name: "Install Podman and dependencies (non-RedHat family)" + when: ansible_facts['os_family'] != "RedHat" + become: yes + ansible.builtin.package: + name: + - podman + - name: "Add explicit cgroupfs configuration" become: yes blockinfile: