Add configuration playbooks for setting up various system components

This commit is contained in:
2020-03-17 22:50:54 -04:00
parent 33ef563375
commit 1f3ca79d04
5 changed files with 102 additions and 29 deletions

View File

@@ -0,0 +1,33 @@
---
- 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] }}"