
Per https://github.com/containers/podman-compose/issues/209 it seems this is a known thing with non root containers, podman, and Ubuntu. Just apply the necessary woraround in a config file so that we don't have to be aware of it every time we try to use podman in this way. It also makes using podman-compose simpler. Change-Id: Ic024e242d99b7f0d4fbd4cf2c3489022b364672d
24 lines
613 B
YAML
24 lines
613 B
YAML
- name: Install podman
|
|
package:
|
|
name:
|
|
- podman
|
|
- uidmap
|
|
- slirp4netns
|
|
- fuse-overlayfs
|
|
- containernetworking-plugins
|
|
# This enables container network dns resolution:
|
|
- golang-github-containernetworking-plugin-dnsname
|
|
state: present
|
|
become: yes
|
|
|
|
- name: Create containers config dir
|
|
file:
|
|
path: '{{ ansible_user_dir }}/.config/containers'
|
|
state: directory
|
|
- name: Force cgroup manager to cgroupfs for Ubuntu
|
|
copy:
|
|
content: |
|
|
[engine]
|
|
cgroup_manager = "cgroupfs"
|
|
dest: '{{ ansible_user_dir }}/.config/containers/containers.conf'
|