ci: update github workflows

This commit is contained in:
auricom
2021-07-28 03:11:06 +02:00
parent 1588499c9f
commit b73ec1db7d
14 changed files with 303 additions and 127 deletions

View File

@@ -1,35 +0,0 @@
---
version: "3"
env:
ANSIBLE_CONFIG: "{{.PROJECT_DIR}}/server/ansible/ansible.cfg"
vars:
ANSIBLE_PLAYBOOK_DIR: "{{.ANSIBLE_DIR}}/playbooks"
ANSIBLE_INVENTORY_DIR: "{{.ANSIBLE_DIR}}/inventory"
ANSIBLE_GROUPS: "master-nodes:worker-nodes"
tasks:
ping:
desc: Ping all the k3s nodes
cmds:
- "ansible {{.ANSIBLE_GROUPS}} -i {{.ANSIBLE_INVENTORY_DIR}}/home-cluster/hosts.yml --one-line -m ping"
silent: true
list:
desc: List all the k3s nodes
cmds:
- "ansible {{.ANSIBLE_GROUPS}} -i {{.ANSIBLE_INVENTORY_DIR}}/home-cluster/hosts.yml --list-hosts"
silent: true
upgrade:
desc: Upgrade all the k3s node's operating system
cmds:
- "ansible-playbook -i {{.ANSIBLE_INVENTORY_DIR}}/home-cluster/hosts.yml {{.ANSIBLE_PLAYBOOK_DIR}}/ubuntu/upgrade.yml"
silent: true
reboot:
desc: Reboot all the k3s nodes
cmds:
- "ansible {{.ANSIBLE_GROUPS}} -i {{.ANSIBLE_INVENTORY_DIR}}/home-cluster/hosts.yml -m reboot"
silent: true

View File

@@ -1,8 +0,0 @@
---
version: "3"
tasks:
default:
cmds:
- task -l
silent: true