Fix: replace deprecated include builtin

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2024-03-12 00:33:50 +01:00
parent fcff1ff3ea
commit ba38259775
Signed by: luzifer
SSH key fingerprint: SHA256:/xtE5lCgiRDQr8SLxHMS92ZBlACmATUmF1crK16Ks4E
2 changed files with 6 additions and 6 deletions

View file

@ -1,5 +1,5 @@
---
- include: Ubuntu.yml
- include_tasks: Ubuntu.yml
...

View file

@ -3,11 +3,11 @@
# Install docker-compose
- name: "Loading distribution specific instructions for {{ ansible_distribution }}"
include: "{{ ansible_distribution }}.yml"
include_tasks: "{{ ansible_distribution }}.yml"
when: not docker_compose_use_docker_image
- name: Install shell wrapper for docker-compose image
include: "docker-wrapper.yml"
include_tasks: "docker-wrapper.yml"
when: docker_compose_use_docker_image
# Configure docker-compose
@ -125,13 +125,13 @@
content: |
#!/bin/bash
set -euo pipefail
function step() { echo $@; }
step "Removing containers created / exited >= ~1h ago..."
CONTAINERS=$(docker ps -a | gawk '/(hours?|days?|weeks?|months?) ago\s+(Created|Exited)/{ print $1 }' | xargs)
[ -n "${CONTAINERS}" ] && docker rm ${CONTAINERS}
step "Removing unused and dangling images..."
docker image prune -a -f
dest: /usr/local/bin/docker-clean