christianlempa-boilerplates/ansible/provisoning/deploy-portainer.yaml
agrestic1 847f5c0c0e
container_name -> name
container_name is not supportet by ansible module community.docker.docker_volume anymore. Changed to name
2022-01-20 10:13:13 +01:00

27 lines
517 B
YAML

---
- hosts: all
tasks:
# Create Portainer Volume
# --
#
- name: Create new Volume
community.docker.docker_volume:
name: portainer_data
# Deploy Portainer
# --
#
- name: Deploy Portainer
community.docker.docker_container:
name: portainer
image: "docker.io/portainer/portainer-ce"
ports:
- "8000:8000"
- "9000:9000"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- portainer_data:/data
restart_policy: always