Option to change the containerd state directory.

This commit is contained in:
Andrea Dell'Amico 2026-01-08 13:09:35 +01:00
parent 07e888d36f
commit bb7b34db85
Signed by untrusted user: adellam
GPG Key ID: 147ABE6CEB9E20FF
2 changed files with 15 additions and 1 deletions

View File

@ -27,6 +27,7 @@ docker_user_home: /home/docker
docker_defaults_file: /etc/default/docker
docker_data_dir: /var/lib/docker
docker_containerd_data_dir: /var/lib/containerd
docker_containerd_state_dir: /run/containerd
# To enable the snapshotter when upgrading to version < 29 set the following to true
docker_enable_overlayfs_snapshotter: false
docker_enable_tcp_socket: false
@ -66,4 +67,4 @@ docker_node_labels: []
# - { key: 'key_name', value: 'label_value' }
docker_restart_daemon_cronjob: false
docker_prune_dangling_volumes: false
docker_prune_dangling_volumes: false

View File

@ -56,6 +56,19 @@
- Restart containerd
- Restart docker
- name: docker_setup | Set the containerd state directory
community.general.ini_file:
path: /etc/containerd/config.toml
option: root
value: '"{{ docker_containerd_state_dir }}"'
owner: root
group: root
mode: "0644"
state: present
notify:
- Restart containerd
- Restart docker
- name: docker_setup | Cron job that prunes the dangling images
block:
- name: docker_setup | Install a script that prunes the docker dangling images