Begin a refactor of playbook naming and organization

This commit is contained in:
Salt 2021-08-23 20:20:59 -05:00
parent 7f8a06180d
commit a2a5f6eedc
5 changed files with 10 additions and 8 deletions

View File

@ -60,10 +60,10 @@ Test:
- 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
Play_Against_Pis:
Play_Against_PiK8S:
stage: play
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 [ -n "$error" ]; then echo "Return code $error"; false; fi
Play_Against_Desktops:

View File

@ -2,8 +2,10 @@
# vim:ft=ansible:
---
# Mass storage Pis
- hosts: tags_pistorage
- hosts: device_roles_pik8s-storage
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
file: path=/data state=directory mode=0755
tags: [ pis, storage ]

View File

@ -2,7 +2,7 @@
# vim:ft=ansible:
---
# k8s
- hosts: tags_pik8s
- hosts: device_roles_pik8s-master,device_roles_pik8s-node
gather_facts: no
roles:
- role: k8s
@ -12,13 +12,13 @@
backup_s3backup_list_extra:
- /etc/kubernetes
tags: [ k8s, backup ]
- hosts: tags_pik8s-master
- hosts: device_roles_pik8s-master
gather_facts: no
tasks:
- name: install openshift
pip: name=openshift state=latest
tags: [ k8s, packages, pip ]
- hosts: tags_pik8s-node
- hosts: device_roles_pik8s-node
gather_facts: no
roles:
- role: keepalived

View File

@ -46,10 +46,10 @@
- import_playbook: playbooks/web.yml
- import_playbook: playbooks/game.yml
- import_playbook: playbooks/pis.yml
- import_playbook: playbooks/pistorage.yml
- import_playbook: playbooks/pik8s-storage.yml
- import_playbook: playbooks/pik8s.yml
- import_playbook: playbooks/desktop.yml
# Background task configuration
- import_playbook: playbooks/ansible-pull.yml
- import_playbook: playbooks/tags_ansible-pull.yml
# Housekeeping
- import_playbook: playbooks/docker-prune.yml