From ba3825977500f24eab182c0b1c3084bedad7524b Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Tue, 12 Mar 2024 00:33:50 +0100 Subject: [PATCH] Fix: replace deprecated `include` builtin Signed-off-by: Knut Ahlers --- tasks/Debian.yml | 2 +- tasks/main.yml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tasks/Debian.yml b/tasks/Debian.yml index 48cb971..16e7a5f 100644 --- a/tasks/Debian.yml +++ b/tasks/Debian.yml @@ -1,5 +1,5 @@ --- -- include: Ubuntu.yml +- include_tasks: Ubuntu.yml ... diff --git a/tasks/main.yml b/tasks/main.yml index 58a419d..cb83a4d 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -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