55 lines
1.3 KiB
YAML
55 lines
1.3 KiB
YAML
- name: Install Podman packages
|
|
apt:
|
|
state: present
|
|
name:
|
|
- podman
|
|
- podman-docker
|
|
- podman-compose
|
|
- containernetworking-plugins
|
|
- crun
|
|
- fuse-overlayfs
|
|
- slirp4netns
|
|
|
|
- name: Disable Docker Emulation warning
|
|
file:
|
|
path: /etc/containers/nodocker
|
|
state: touch
|
|
mode: 420
|
|
modification_time: preserve
|
|
access_time: preserve
|
|
|
|
- name: Configure containers.conf
|
|
copy:
|
|
dest: /etc/containers/containers.conf
|
|
src: containers.conf
|
|
|
|
- name: Configure storage.conf
|
|
copy:
|
|
dest: /etc/containers/storage.conf
|
|
src: storage.conf
|
|
|
|
- name: Configure cr.wks registry
|
|
copy:
|
|
dest: /etc/containers/registries.conf.d/cr.wks.conf
|
|
src: cr.wks.conf
|
|
|
|
- name: Configure docker-mirror registry
|
|
copy:
|
|
dest: /etc/containers/registries.conf.d/dr-mirror.wks.conf
|
|
src: dr-mirror.wks.conf
|
|
|
|
- name: Remote NFS volumes
|
|
block:
|
|
- name: Create mount Point
|
|
file:
|
|
path: /var/lib/containers/storage/volumes
|
|
state: directory
|
|
owner: root
|
|
group: root
|
|
- name: Mount containers from NFS
|
|
ansible.posix.mount:
|
|
src: ebin01.wks:/data/raid1-ssd/node-data/{{ ansible_nodename }}-podman-volumes
|
|
path: /var/lib/containers/storage/volumes
|
|
opts: auto,_netdev,defaults,x-systemd.wanted-by=podman.service,x-systemd.wanted-by=nomad.service
|
|
state: mounted
|
|
fstype: nfs |