mirror of
https://github.com/ChristianLempa/boilerplates.git
synced 2024-12-01 12:45:00 +01:00
22 lines
566 B
YAML
22 lines
566 B
YAML
---
|
|
- name: Deploy portainer-ce latest
|
|
hosts: "{{ my_hosts | d([]) }}"
|
|
become: true
|
|
become_user: "{{ lookup('env','USER') }}"
|
|
|
|
tasks:
|
|
- name: Create new volume
|
|
community.docker.docker_volume:
|
|
name: portainer-data
|
|
|
|
- name: Deploy portainer
|
|
community.docker.docker_container:
|
|
name: portainer
|
|
image: "docker.io/portainer/portainer-ce"
|
|
ports:
|
|
- "9443:9443"
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
- portainer-data:/data
|
|
restart_policy: unless-stopped
|