homelab/roles/portainer/tasks/main.yml

19 lines
476 B
YAML
Raw Normal View History

2021-06-20 20:29:11 +00:00
- name: run container
docker_container:
name: 'portainer'
image: portainer/portainer-ce
networks:
- name: external
2021-06-21 09:28:52 +00:00
- name: openldap
2021-06-20 20:29:11 +00:00
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
ports:
- "8000:8000"
- "9000:9000"
2021-06-20 21:26:54 +00:00
state: started
- name: copy nginx conf
template:
src: portainer.conf.j2
dest: "{{ data_folder }}/nginx/conf.d/{{ role_name }}.{{ base_domain }}.conf"
mode: "755"
notify: reload nginx