From 21574edc683639ce0d409e0a72d59d0843171bdd Mon Sep 17 00:00:00 2001 From: Adrien Date: Sun, 10 May 2020 21:09:17 +0200 Subject: [PATCH] First working release --- tasks/main.yml | 30 +++++++++++-------- .../crio/crio.conf.d/01-crio-runtime.conf.j2 | 2 ++ 2 files changed, 20 insertions(+), 12 deletions(-) create mode 100644 templates/etc/crio/crio.conf.d/01-crio-runtime.conf.j2 diff --git a/tasks/main.yml b/tasks/main.yml index 7c50ddd..63b7513 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -41,7 +41,9 @@ creates: /etc/yum.repos.d/_copr:copr.fedorainfracloud.org:rhcontainerbot:container-selinux.repo warn: no - name: Install container-selinux GPG key - command: rpm --import https://download.copr.fedorainfracloud.org/results/rhcontainerbot/container-selinux/pubkey.gpg + command: + cmd: rpm --import https://download.copr.fedorainfracloud.org/results/rhcontainerbot/container-selinux/pubkey.gpg + warn: no - name: Registering libcontainers repository get_url: @@ -51,7 +53,9 @@ group: root mode: 0644 - name: Install libcontainers GPG key - command: rpm --import http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/CentOS_8/repodata/repomd.xml.key + command: + cmd: rpm --import http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/CentOS_8/repodata/repomd.xml.key + warn: no - name: Registering CRI-O 1.18 repository get_url: @@ -61,25 +65,20 @@ group: root mode: 0644 - name: Install CRI-O GPG key - command: rpm --import http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/1.18:/1.18.0/CentOS_8/repodata/repomd.xml.key + command: + cmd: rpm --import http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/1.18:/1.18.0/CentOS_8/repodata/repomd.xml.key + warn: no -- name: Install cri-o +- name: Update package manager list package: update_cache: yes -- name: Install cri-o +- name: Install cri-o package package: name: "{{ crio_package_name }}" state: latest notify: Restart cri-o -- name: Enable cri-o on boot - service: - name: cri-o - state: started - enabled: yes - - - name: Ensuring /etc/crio/crio.conf.d folder exists file: path: "/etc/crio/crio.conf.d" @@ -96,7 +95,14 @@ owner: root mode: 0644 with_items: + - "01-crio-runtime.conf" - "01-cgroup-manager.conf" - "01-log-level.conf" - "01-metrics.conf" notify: Restart containerd + +- name: Enable cri-o on boot + service: + name: cri-o + state: restarted + enabled: yes diff --git a/templates/etc/crio/crio.conf.d/01-crio-runtime.conf.j2 b/templates/etc/crio/crio.conf.d/01-crio-runtime.conf.j2 new file mode 100644 index 0000000..4de599f --- /dev/null +++ b/templates/etc/crio/crio.conf.d/01-crio-runtime.conf.j2 @@ -0,0 +1,2 @@ +[crio.runtime] +conmon = "/usr/bin/conmon" \ No newline at end of file