mirror of
https://github.com/natelandau/ansible-homelab-config.git
synced 2025-11-08 05:03:47 -05:00
feat: purge dangling Docker containers on job sync
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
[defaults]
|
||||
nocows = True
|
||||
roles_path = ./galaxy-roles:./roles
|
||||
collections_paths = ./
|
||||
collections_path = ./
|
||||
inventory = ./inventory.yml
|
||||
stdout_callback = yaml
|
||||
any_errors_fatal = True
|
||||
|
||||
@@ -74,3 +74,15 @@
|
||||
dest: "{{ docker_compose_file_location }}/{{ item | basename | regex_replace('.j2$', '') }}"
|
||||
mode: 0644
|
||||
with_fileglob: "../templates/docker_compose_files/*.j2"
|
||||
|
||||
- name: "Prune docker caches"
|
||||
community.docker.docker_prune:
|
||||
containers: true
|
||||
images: true
|
||||
images_filters:
|
||||
dangling: false
|
||||
networks: true
|
||||
volumes: true
|
||||
builder_cache: true
|
||||
when:
|
||||
- is_docker_compose_client or is_nomad_client or is_nomad_server
|
||||
|
||||
Reference in New Issue
Block a user