mirror of
https://github.com/luzifer-ansible/docker-compose.git
synced 2024-12-22 09:01:15 +00:00
Fix: replace deprecated include
builtin
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
fcff1ff3ea
commit
ba38259775
2 changed files with 6 additions and 6 deletions
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
|
|
||||||
- include: Ubuntu.yml
|
- include_tasks: Ubuntu.yml
|
||||||
|
|
||||||
...
|
...
|
||||||
|
|
|
@ -3,11 +3,11 @@
|
||||||
# Install docker-compose
|
# Install docker-compose
|
||||||
|
|
||||||
- name: "Loading distribution specific instructions for {{ ansible_distribution }}"
|
- name: "Loading distribution specific instructions for {{ ansible_distribution }}"
|
||||||
include: "{{ ansible_distribution }}.yml"
|
include_tasks: "{{ ansible_distribution }}.yml"
|
||||||
when: not docker_compose_use_docker_image
|
when: not docker_compose_use_docker_image
|
||||||
|
|
||||||
- name: Install shell wrapper for docker-compose image
|
- name: Install shell wrapper for docker-compose image
|
||||||
include: "docker-wrapper.yml"
|
include_tasks: "docker-wrapper.yml"
|
||||||
when: docker_compose_use_docker_image
|
when: docker_compose_use_docker_image
|
||||||
|
|
||||||
# Configure docker-compose
|
# Configure docker-compose
|
||||||
|
@ -125,13 +125,13 @@
|
||||||
content: |
|
content: |
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
function step() { echo $@; }
|
function step() { echo $@; }
|
||||||
|
|
||||||
step "Removing containers created / exited >= ~1h ago..."
|
step "Removing containers created / exited >= ~1h ago..."
|
||||||
CONTAINERS=$(docker ps -a | gawk '/(hours?|days?|weeks?|months?) ago\s+(Created|Exited)/{ print $1 }' | xargs)
|
CONTAINERS=$(docker ps -a | gawk '/(hours?|days?|weeks?|months?) ago\s+(Created|Exited)/{ print $1 }' | xargs)
|
||||||
[ -n "${CONTAINERS}" ] && docker rm ${CONTAINERS}
|
[ -n "${CONTAINERS}" ] && docker rm ${CONTAINERS}
|
||||||
|
|
||||||
step "Removing unused and dangling images..."
|
step "Removing unused and dangling images..."
|
||||||
docker image prune -a -f
|
docker image prune -a -f
|
||||||
dest: /usr/local/bin/docker-clean
|
dest: /usr/local/bin/docker-clean
|
||||||
|
|
Loading…
Reference in a new issue