Skip to content

Instantly share code, notes, and snippets.

@chofstede
Created May 17, 2023 07:47
Show Gist options
  • Select an option

  • Save chofstede/ae1f3a551849020df90963d46a68d722 to your computer and use it in GitHub Desktop.

Select an option

Save chofstede/ae1f3a551849020df90963d46a68d722 to your computer and use it in GitHub Desktop.
Update multiple docker-compose containers using Ansible
---
- name: Update docker containers
hosts: localhost
connection: local
gather_facts: false
tasks:
- name: Update Docker containers to latest state and restart them
community.docker.docker_compose:
project_src: "{{ item }}"
pull: true
restarted: true
loop:
- /opt/authelia
- /opt/crowdsec
....
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment