mirror of
https://github.com/ChristianLempa/boilerplates.git
synced 2025-01-27 00:31:05 +01:00
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.
This commit is contained in:
parent
7ceb755f35
commit
7983a7c85f
@ -1,11 +1,9 @@
|
||||
---
|
||||
- name: Deploy traefik v2.5
|
||||
hosts: "{{ my_hosts | d([]) }}"
|
||||
become: true
|
||||
|
||||
tasks:
|
||||
- name: Deploy traefik
|
||||
become_user: "{{ lookup('env', 'USER') }}"
|
||||
community.docker.docker_container:
|
||||
name: traefik
|
||||
image: "traefik:v2.5"
|
||||
@ -16,3 +14,5 @@
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- /etc/traefik:/etc/traefik
|
||||
restart_policy: unless-stopped
|
||||
become: true
|
||||
become_user: "{{ lookup('env', 'USER') }}"
|
||||
|
Loading…
Reference in New Issue
Block a user