This repository has been archived on 2024-05-02. You can view files and clone it, but cannot push or open issues or pull requests.
omni-ansible/playbooks/configure-docker.yml

34 lines
759 B
YAML
Raw Normal View History

---
- 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] }}"