main
Ricard Illa 2022-10-30 16:32:32 +01:00
parent 56c87e9735
commit 1ccda61a88
No known key found for this signature in database
GPG Key ID: F69A672B72E54902
6 changed files with 62 additions and 3 deletions

View File

@ -39,13 +39,20 @@
- name: docker
hosts:
- suricata
- caladan
- narwhal
become: true
roles:
- docker
- name: podman
hosts:
- suricata
become: true
roles:
- podman
tags: podman
- name: common roles
hosts:
- caladan

View File

@ -7,3 +7,5 @@ deb_arch_mapping: {
"x86_64": "amd64",
"i386": "i386"
}
main_user: rilla

View File

@ -105,9 +105,9 @@ all:
passno: "0"
- src: "/dev/mapper/disk0"
path: "/var/lib/docker"
path: "/var/lib/containers"
fstype: "btrfs"
opts: "subvol=docker,noatime"
opts: "subvol=containers,noatime"
passno: "0"
rpi_cfg:

View File

@ -0,0 +1,44 @@
---
- name: install podman with apk
apk:
name:
- podman
- name: enable cgroups v2
lineinfile:
path: /etc/rc.conf
line: 'rc_cgroup_mode="unified"'
regexp: '#?rc_cgroup_mode=".+"'
- name: start and enable cgroups
service:
name: cgroups
state: started
enabled: true
- name: set podman storage driver
lineinfile:
path: /etc/containers/storage.conf
line: 'driver = "{{ podman_storage_driver }}"'
regexp: '"driver = ".+"'
- name: load tun module for rootless podman support
modprobe:
name: tun
state: present
- name: tun module on startup
lineinfile:
path: /etc/modules
line: tun
insertafter: EOF
- name: lines for podman rootless support on /etc/subuid and /etc/subgid
lineinfile:
path: "{{ item }}"
line: "{{ main_user }}:100000:65536"
insertafter: EOF
loop:
- /etc/subuid
- /etc/subgid

View File

@ -0,0 +1,5 @@
---
- name: 'alpine-specific podman things'
include_tasks: alpine.yml
when: ansible_distribution == "Alpine"

View File

@ -0,0 +1 @@
podman_storage_driver: btrfs