diff --git a/playbooks/pik8s.yml b/playbooks/pik8s.yml new file mode 100755 index 0000000..0d3fac0 --- /dev/null +++ b/playbooks/pik8s.yml @@ -0,0 +1,19 @@ +#!/usr/bin/env ansible-playbook +# vim:ft=ansible: +--- +# k8s +- 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 ] diff --git a/playbooks/pimp.yml b/playbooks/pimp.yml new file mode 100755 index 0000000..a4ba3c2 --- /dev/null +++ b/playbooks/pimp.yml @@ -0,0 +1,66 @@ +#!/usr/bin/env ansible-playbook +# vim:ft=ansible: +--- +# Multipurpose Pis running unbound +- 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 + restart_policy: unless-stopped + pull: yes + ports: + - "{{ ansible_facts.eth0.ipv4.address }}:53:5053/tcp" + - "{{ ansible_facts.eth0.ipv4.address }}:53:5053/udp" + tags: [ pis, mp, unbound ] + roles: + - role: motd + vars: + motd_watch_services_extra: + - docker + - isc-dhcp-server + tags: [ pis, mp, motd ] +# 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 + vars: + dhcp_global_failover_peer: failover-group + dhcp_global_failover: + role: primary + address: 192.168.103.100 + port: 647 + peer_address: 192.168.103.101 + peer_port: 647 + max_response_delay: 15 + max_unacked_updates: 10 + load_balance_max_seconds: 5 + split: 255 + mclt: 3600 + tags: [ pis, mp, dhcp ] +- hosts: pi-mp-2.desu.ltd + vars_files: + - vars/desulocal-dhcp.yml + roles: + - role: netplan-static-ip + tags: [ pis, mp, dhcp, static-ip ] + - role: dhcp + vars: + dhcp_global_failover_peer: failover-group + dhcp_global_failover: + role: secondary + address: 192.168.103.101 + port: 647 + peer_address: 192.168.103.100 + peer_port: 647 + max_response_delay: 15 + max_unacked_updates: 10 + load_balance_max_seconds: 5 + tags: [ pis, mp, dhcp ] diff --git a/playbooks/pis.yml b/playbooks/pis.yml index 37ec17e..63fa86d 100755 --- a/playbooks/pis.yml +++ b/playbooks/pis.yml @@ -15,82 +15,3 @@ - python3-docker - libraspberrypi-bin tags: [ pis, packages ] -# k8s -- 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 ] -# Multipurpose Pis running unbound -- 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 - restart_policy: unless-stopped - pull: yes - ports: - - "{{ ansible_facts.eth0.ipv4.address }}:53:5053/tcp" - - "{{ ansible_facts.eth0.ipv4.address }}:53:5053/udp" - tags: [ pis, mp, unbound ] - roles: - - role: motd - vars: - motd_watch_services_extra: - - docker - - isc-dhcp-server - tags: [ pis, mp, motd ] -# 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 - vars: - dhcp_global_failover_peer: failover-group - dhcp_global_failover: - role: primary - address: 192.168.103.100 - port: 647 - peer_address: 192.168.103.101 - peer_port: 647 - max_response_delay: 15 - max_unacked_updates: 10 - load_balance_max_seconds: 5 - split: 255 - mclt: 3600 - tags: [ pis, mp, dhcp ] -- hosts: pi-mp-2.desu.ltd - vars_files: - - vars/desulocal-dhcp.yml - roles: - - role: netplan-static-ip - tags: [ pis, mp, dhcp, static-ip ] - - role: dhcp - vars: - dhcp_global_failover_peer: failover-group - dhcp_global_failover: - role: secondary - address: 192.168.103.101 - port: 647 - peer_address: 192.168.103.100 - peer_port: 647 - max_response_delay: 15 - max_unacked_updates: 10 - load_balance_max_seconds: 5 - tags: [ pis, mp, dhcp ] diff --git a/site.yml b/site.yml index 00ca54e..060a1b8 100755 --- a/site.yml +++ b/site.yml @@ -21,4 +21,6 @@ - import_playbook: playbooks/web.yml - import_playbook: playbooks/game.yml - import_playbook: playbooks/pis.yml +- import_playbook: playbooks/pik8s.yml +- import_playbook: playbooks/pimp.yml - import_playbook: playbooks/desktop.yml