mirror of
https://github.com/ChristianLempa/boilerplates.git
synced 2024-11-29 11:43:48 +01:00
28 lines
553 B
YAML
28 lines
553 B
YAML
|
---
|
||
|
- hosts: all
|
||
|
|
||
|
become: yes
|
||
|
become_user: "{{ lookup('env','USER') }}"
|
||
|
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:
|
||
|
- "9443:9443"
|
||
|
volumes:
|
||
|
- /var/run/docker.sock:/var/run/docker.sock
|
||
|
- portainer-data:/data
|
||
|
restart_policy: always
|