[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 - name: Ensure dockerd-rootless-setup.sh is installed
apt: package:
name: name:
- uidmap - uidmap
- docker-ce-rootless-extras - docker-ce-rootless-extras
state: present 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 - name: Stop any running root instances of docker daemon
service: service:
@ -23,6 +32,10 @@
path: /var/run/docker.sock path: /var/run/docker.sock
state: absent state: absent
- name: Modprobe ip_tables
modprobe:
name: ip_tables
- name: Install rootless docker - name: Install rootless docker
become: false become: false
command: /usr/bin/dockerd-rootless-setuptool.sh install command: /usr/bin/dockerd-rootless-setuptool.sh install