[rootless docker] Ensure this works for CentOS Stream 9

This commit is contained in:
John Robbins 2023-04-11 20:52:30 -06:00
parent fdc2082c61
commit 8278f01d06

View File

@ -1,10 +1,19 @@
---
- name: Ensure dockerd-rootless-setup.sh is installed
apt:
package:
name:
- uidmap
- docker-ce-rootless-extras
state: present
when: ansible_distribution != "CentOS"
- name: Ensure dockerd-rootless-setup.sh is installed
package:
name:
- shadow-utils
- docker-ce-rootless-extras
state: present
when: ansible_distribution == "CentOS"
- name: Stop any running root instances of docker daemon
service:
@ -23,6 +32,10 @@
path: /var/run/docker.sock
state: absent
- name: Modprobe ip_tables
modprobe:
name: ip_tables
- name: Install rootless docker
become: false
command: /usr/bin/dockerd-rootless-setuptool.sh install