2021-02-25 12:56:48 -06:00
|
|
|
#!/usr/bin/env ansible-playbook
|
|
|
|
# vim:ft=ansible:
|
|
|
|
---
|
2021-02-27 07:20:50 -06:00
|
|
|
# General configuration
|
2021-02-25 12:56:48 -06:00
|
|
|
- hosts: pis
|
|
|
|
roles:
|
2021-02-25 20:47:40 -06:00
|
|
|
- role: zerotier
|
|
|
|
tags: [ pis, zerotier ]
|
2021-02-25 12:56:48 -06:00
|
|
|
- role: docker
|
2021-02-25 20:47:40 -06:00
|
|
|
tags: [ pis, docker, skip-pull ]
|
2021-02-27 07:20:50 -06:00
|
|
|
tasks:
|
|
|
|
- name: install python3-docker
|
|
|
|
apt: name=python3-docker
|
|
|
|
tags: [ pis, docker ]
|
|
|
|
# k8s
|
2021-02-27 05:00:30 -06:00
|
|
|
- hosts: pik8s
|
|
|
|
roles:
|
|
|
|
- role: k8s
|
|
|
|
tags: [ k8s, skip-pull ]
|
|
|
|
- role: motd
|
|
|
|
vars:
|
|
|
|
motd_watch_services_extra:
|
|
|
|
- docker
|
|
|
|
- kubelet
|
|
|
|
tags: [ k8s, motd ]
|
|
|
|
- hosts: pik8s_masters
|
|
|
|
tasks:
|
|
|
|
- name: install openshift
|
|
|
|
pip: name=openshift state=latest
|
|
|
|
tags: [ k8s, packages, pip ]
|
2021-02-27 08:42:15 -06:00
|
|
|
# Multipurpose Pis running unbound
|
2021-02-27 07:20:50 -06:00
|
|
|
- hosts: pi-mp-1.desu.ltd,pi-mp-2.desu.ltd
|
|
|
|
vars:
|
|
|
|
container_default_behavior: no_defaults
|
|
|
|
tasks:
|
|
|
|
- name: docker deploy unbound
|
|
|
|
docker_container:
|
|
|
|
name: unbound
|
|
|
|
image: rehashedsalt/unbound-desu-local:latest
|
2021-02-27 08:58:41 -06:00
|
|
|
restart_policy: unless-stopped
|
2021-02-27 07:20:50 -06:00
|
|
|
pull: yes
|
|
|
|
ports:
|
|
|
|
- "{{ ansible_facts.eth0.ipv4.address }}:53:5053/tcp"
|
|
|
|
- "{{ ansible_facts.eth0.ipv4.address }}:53:5053/udp"
|
2021-02-27 08:42:15 -06:00
|
|
|
tags: [ pis, mp, unbound ]
|
|
|
|
# And also serving DHCP
|
|
|
|
- hosts: pi-mp-1.desu.ltd
|
|
|
|
vars_files:
|
|
|
|
- vars/desulocal-dhcp.yml
|
|
|
|
roles:
|
|
|
|
- role: netplan-static-ip
|
|
|
|
tags: [ pis, mp, dhcp, static-ip ]
|
|
|
|
- role: dhcp
|
|
|
|
tags: [ pis, mp, dhcp ]
|