split subtasks into separate files

This commit is contained in:
2022-06-22 18:30:58 +02:00
parent c110e3d96e
commit e0e2c5a3fd
3 changed files with 33 additions and 19 deletions

View File

@@ -0,0 +1,11 @@
- name: docker | install portainer | create directory
file:
path: "/opt/docker/portainer"
state: present
owner: "root" # not required. Name of the user that should own the file/directory, as would be fed to I(chown).
- name: docker | install portainer | docker run
command:
cmd: "docker run -d -p 8000:8000 -p 9443:9443 --name portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v /opt/docker/portainer/data:/data portainer/portainer:latest" # not required. The command to run.
creates: /opt/docker/portainer/data