34 lines
759 B
YAML
34 lines
759 B
YAML
|
---
|
||
|
- import_playbook: meta.yml
|
||
|
|
||
|
- name: Configure docker hosts
|
||
|
hosts: servers
|
||
|
roles:
|
||
|
- role: docker
|
||
|
tasks:
|
||
|
- name: Configure portainer volume
|
||
|
docker_volume:
|
||
|
volume_name: portainer
|
||
|
|
||
|
- name: Run portainer
|
||
|
docker_container:
|
||
|
name: omni.portainer
|
||
|
image: portainer/portainer
|
||
|
restart_policy: unless-stopped
|
||
|
published_ports:
|
||
|
- 0.0.0.0:8000:8000
|
||
|
- 0.0.0.0:9000:9000
|
||
|
volumes:
|
||
|
- /var/run/docker.sock:/var/run/docker.sock
|
||
|
- portainer:/data
|
||
|
|
||
|
- name: Configure swarm master
|
||
|
hosts:
|
||
|
- jupiter
|
||
|
- vigil-nox
|
||
|
tasks:
|
||
|
- name: Initialize swarm
|
||
|
docker_swarm:
|
||
|
name: omni
|
||
|
advertise_addr: "{{ omni_networking.eno2.address[0] }}"
|