Compare commits
3 Commits
d63a190b25
...
02dd6cd553
Author | SHA1 | Date | |
---|---|---|---|
02dd6cd553 | |||
a2a5f6eedc | |||
7f8a06180d |
@ -60,16 +60,16 @@ Test:
|
|||||||
- if [ "$error" -eq 4 ]; then echo "Some hosts were unreachable; masking error"; unset error; fi
|
- if [ "$error" -eq 4 ]; then echo "Some hosts were unreachable; masking error"; unset error; fi
|
||||||
- if [ -n "$error" ]; then echo "Return code $error"; false; fi
|
- if [ -n "$error" ]; then echo "Return code $error"; false; fi
|
||||||
|
|
||||||
Play_Against_Pis:
|
Play_Against_PiK8S:
|
||||||
stage: play
|
stage: play
|
||||||
script:
|
script:
|
||||||
- ansible-playbook -l tags_pis site.yml --vault-password-file /vaultpw || error="$?"
|
- ansible-playbook -l device_roles_pik8s-master,device_roles_pik8s-node,device_roles_pik8s-storage site.yml --vault-password-file /vaultpw || error="$?"
|
||||||
- if [ "$error" -eq 4 ]; then echo "Some hosts were unreachable; masking error"; unset error; fi
|
- if [ "$error" -eq 4 ]; then echo "Some hosts were unreachable; masking error"; unset error; fi
|
||||||
- if [ -n "$error" ]; then echo "Return code $error"; false; fi
|
- if [ -n "$error" ]; then echo "Return code $error"; false; fi
|
||||||
Play_Against_Desktops:
|
Play_Against_Desktops:
|
||||||
stage: play
|
stage: play
|
||||||
script:
|
script:
|
||||||
- ansible-playbook -l tags_desktop site.yml --vault-password-file /vaultpw || error="$?"
|
- ansible-playbook -l device_roles_workstation site.yml --vault-password-file /vaultpw || error="$?"
|
||||||
- if [ "$error" -eq 4 ]; then echo "Some hosts were unreachable; masking error"; unset error; fi
|
- if [ "$error" -eq 4 ]; then echo "Some hosts were unreachable; masking error"; unset error; fi
|
||||||
- if [ -n "$error" ]; then echo "Return code $error"; false; fi
|
- if [ -n "$error" ]; then echo "Return code $error"; false; fi
|
||||||
Play_Against_Production:
|
Play_Against_Production:
|
||||||
|
@ -2,8 +2,10 @@
|
|||||||
# vim:ft=ansible:
|
# vim:ft=ansible:
|
||||||
---
|
---
|
||||||
# Mass storage Pis
|
# Mass storage Pis
|
||||||
- hosts: tags_pistorage
|
- hosts: device_roles_pik8s-storage
|
||||||
tasks:
|
tasks:
|
||||||
|
# The specific mount here is because each storage node as an M.2 SSD hooked up to it
|
||||||
|
# So we mount that and use the SD card for normal OS shenanigans
|
||||||
- name: assure mount directory
|
- name: assure mount directory
|
||||||
file: path=/data state=directory mode=0755
|
file: path=/data state=directory mode=0755
|
||||||
tags: [ pis, storage ]
|
tags: [ pis, storage ]
|
@ -2,7 +2,7 @@
|
|||||||
# vim:ft=ansible:
|
# vim:ft=ansible:
|
||||||
---
|
---
|
||||||
# k8s
|
# k8s
|
||||||
- hosts: tags_pik8s
|
- hosts: device_roles_pik8s-master,device_roles_pik8s-node
|
||||||
gather_facts: no
|
gather_facts: no
|
||||||
roles:
|
roles:
|
||||||
- role: k8s
|
- role: k8s
|
||||||
@ -12,13 +12,13 @@
|
|||||||
backup_s3backup_list_extra:
|
backup_s3backup_list_extra:
|
||||||
- /etc/kubernetes
|
- /etc/kubernetes
|
||||||
tags: [ k8s, backup ]
|
tags: [ k8s, backup ]
|
||||||
- hosts: tags_pik8s-master
|
- hosts: device_roles_pik8s-master
|
||||||
gather_facts: no
|
gather_facts: no
|
||||||
tasks:
|
tasks:
|
||||||
- name: install openshift
|
- name: install openshift
|
||||||
pip: name=openshift state=latest
|
pip: name=openshift state=latest
|
||||||
tags: [ k8s, packages, pip ]
|
tags: [ k8s, packages, pip ]
|
||||||
- hosts: tags_pik8s-node
|
- hosts: device_roles_pik8s-node
|
||||||
gather_facts: no
|
gather_facts: no
|
||||||
roles:
|
roles:
|
||||||
- role: keepalived
|
- role: keepalived
|
@ -2,7 +2,7 @@
|
|||||||
# vim:ft=ansible:
|
# vim:ft=ansible:
|
||||||
---
|
---
|
||||||
# Home desktops
|
# Home desktops
|
||||||
- hosts: tags_desktop
|
- hosts: device_roles_workstation
|
||||||
tasks:
|
tasks:
|
||||||
- name: assure pi-storage-1 nfs mountpoint
|
- name: assure pi-storage-1 nfs mountpoint
|
||||||
file: path=/nfs/pi-storage-1.desu.ltd state=directory owner=root mode=0755
|
file: path=/nfs/pi-storage-1.desu.ltd state=directory owner=root mode=0755
|
34
site.yml
34
site.yml
@ -37,19 +37,21 @@
|
|||||||
UsePAM: yes
|
UsePAM: yes
|
||||||
X11Forwarding: no
|
X11Forwarding: no
|
||||||
tags: [ sshd, common ]
|
tags: [ sshd, common ]
|
||||||
# Fundamental daemon configuration
|
# Manufacturer configuration
|
||||||
- import_playbook: playbooks/zerotier.yml
|
- import_playbook: playbooks/manufacturers_raspi.yml
|
||||||
- import_playbook: playbooks/snmp.yml
|
# Tags for fundamental services
|
||||||
- import_playbook: playbooks/nrpe.yml
|
- import_playbook: playbooks/tags_zerotier.yml
|
||||||
# Application configuration
|
- import_playbook: playbooks/tags_snmp.yml
|
||||||
- import_playbook: playbooks/db.yml
|
- import_playbook: playbooks/tags_nagios-nrpe.yml
|
||||||
- import_playbook: playbooks/web.yml
|
# Device roles
|
||||||
- import_playbook: playbooks/game.yml
|
- import_playbook: playbooks/device_roles_pik8s-storage.yml
|
||||||
- import_playbook: playbooks/pis.yml
|
- import_playbook: playbooks/device_roles_pik8s.yml
|
||||||
- import_playbook: playbooks/pistorage.yml
|
- import_playbook: playbooks/device_roles_workstation.yml
|
||||||
- import_playbook: playbooks/pik8s.yml
|
# Production configuration
|
||||||
- import_playbook: playbooks/desktop.yml
|
- import_playbook: playbooks/prod_db.yml
|
||||||
# Background task configuration
|
- import_playbook: playbooks/prod_web.yml
|
||||||
- import_playbook: playbooks/ansible-pull.yml
|
- import_playbook: playbooks/prod_game.yml
|
||||||
# Housekeeping
|
# Supplementary tags
|
||||||
- import_playbook: playbooks/docker-prune.yml
|
- import_playbook: playbooks/tags_ansible-pull.yml
|
||||||
|
# Housekeeping tags for one-off tasks
|
||||||
|
- import_playbook: playbooks/tags_docker-prune.yml
|
||||||
|
Loading…
Reference in New Issue
Block a user