split subtasks into separate files
This commit is contained in:
11
roles/docker/tasks/install_portainer.yml
Normal file
11
roles/docker/tasks/install_portainer.yml
Normal 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
|
||||
Reference in New Issue
Block a user