From b2dd062e6f3ebdb4643aabf859f57d8d7a906dbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20Torma?= Date: Wed, 30 Aug 2023 23:35:26 +0200 Subject: [PATCH] add prune --- .drone.yml | 1 + requirements.yaml | 6 ++++++ roles/update/tasks/main.yaml | 8 ++++++++ 3 files changed, 15 insertions(+) create mode 100644 requirements.yaml diff --git a/.drone.yml b/.drone.yml index 5b42c65..ef65327 100644 --- a/.drone.yml +++ b/.drone.yml @@ -15,5 +15,6 @@ steps: commands: - echo "$SSH_KEY" > $PWD/id_rsa - chmod 0600 $PWD/id_rsa + - ansible-galaxy collection install -r requirements.yaml - ansible-playbook -i inventory.yaml nightly.yaml ... diff --git a/requirements.yaml b/requirements.yaml new file mode 100644 index 0000000..8bb0d42 --- /dev/null +++ b/requirements.yaml @@ -0,0 +1,6 @@ +--- +collections: +- ansible.posix +- community.general +- community.docker.docker_prune +... diff --git a/roles/update/tasks/main.yaml b/roles/update/tasks/main.yaml index b6ccdc8..41458d7 100644 --- a/roles/update/tasks/main.yaml +++ b/roles/update/tasks/main.yaml @@ -13,4 +13,12 @@ command: docker-compose up -d args: chdir: /home/service-user + +- name: Prune everything + community.docker.docker_prune: + containers: true + images: true + networks: true + volumes: true + builder_cache: true ...