overleaf/install_docker.yaml

32 lines
712 B
YAML
Raw Normal View History

2024-04-08 10:49:57 +02: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
recreate: yes
restart_policy: always
published_ports:
- "8000:8000/tcp"
- "9443:9443/tcp"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- portainer_data:/data