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