christianlempa-boilerplates/ansible/deployment/traefik/deploy-traefik.yaml
Christoph Schug 7983a7c85f fix: fix use of become/become_user
If `become_user` is being defined on a task level, also `become` should
be set on that very task. As there aren't any other tasks, the `become`
on the top-level becomes obsolete.
2024-03-03 17:54:55 +01:00

19 lines
469 B
YAML

---
- name: Deploy traefik v2.5
hosts: "{{ my_hosts | d([]) }}"
tasks:
- name: Deploy traefik
community.docker.docker_container:
name: traefik
image: "traefik:v2.5"
ports:
- "80:80"
- "443:443"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /etc/traefik:/etc/traefik
restart_policy: unless-stopped
become: true
become_user: "{{ lookup('env', 'USER') }}"