neuro_ansible/install_scripts/install_portainer.yaml

32 lines
708 B
YAML
Raw Permalink Normal View History

2024-03-29 20:39:15 +01:00
---
- name: install docker as systemd plus add a protainer web
hosts: all
become: true
tasks:
- name: remove other files
include_tasks: yaml_sub/install_docker.yaml
- name: Create a volume
community.docker.docker_volume:
name: portainer_data
state: present
- name: Create portainer container
community.docker.docker_container:
name: portainerweb
image: portainer/portainer-ce
state: started
2024-04-16 10:10:11 +02:00
recreate: no
2024-03-29 20:39:15 +01:00
restart_policy: always
published_ports:
2024-04-18 17:10:00 +02:00
- "80:8000/tcp"
- "443:9443/tcp"
2024-03-29 20:39:15 +01:00
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- portainer_data:/data