chore: Add homebrew task to taskfile and update README.md
Signed-off-by: Devin Buhl <devin@buhl.casa>
This commit is contained in:
6 files changed
+144
-126
No files matched your search
@@ -0,0 +1,67 @@
|
||||
---
|
||||
version: "3"
|
||||
|
||||
env:
|
||||
ANSIBLE_CONFIG: "{{.PROJECT_DIR}}/ansible.cfg"
|
||||
|
||||
vars:
|
||||
ANSIBLE_PLAYBOOK_DIR: "{{.ANSIBLE_DIR}}/playbooks"
|
||||
ANSIBLE_INVENTORY_DIR: "{{.ANSIBLE_DIR}}/inventory"
|
||||
|
||||
tasks:
|
||||
|
||||
init:
|
||||
desc: Install / Upgrade Ansible galaxy deps
|
||||
dir: provision/ansible
|
||||
cmds:
|
||||
- ansible-galaxy install -r requirements.yml --roles-path ~/.ansible/roles --force
|
||||
- ansible-galaxy collection install -r requirements.yml --collections-path ~/.ansible/collections --force
|
||||
|
||||
list:
|
||||
desc: List all the hosts
|
||||
dir: provision/ansible
|
||||
cmds:
|
||||
- ansible all -i {{.ANSIBLE_INVENTORY_DIR}}/hosts.yml --list-hosts
|
||||
|
||||
prepare:
|
||||
desc: Prepare all the k8s nodes for running k3s
|
||||
dir: provision/ansible
|
||||
cmds:
|
||||
- ansible-playbook -i {{.ANSIBLE_INVENTORY_DIR}}/hosts.yml {{.ANSIBLE_PLAYBOOK_DIR}}/ubuntu-prepare.yml
|
||||
|
||||
install:
|
||||
desc: Install Kubernetes on the nodes
|
||||
dir: provision/ansible
|
||||
cmds:
|
||||
- ansible-playbook -i {{.ANSIBLE_INVENTORY_DIR}}/hosts.yml {{.ANSIBLE_PLAYBOOK_DIR}}/k3s-install.yml
|
||||
|
||||
nuke:
|
||||
desc: Uninstall Kubernetes on the nodes
|
||||
dir: provision/ansible
|
||||
cmds:
|
||||
- ansible-playbook -i {{.ANSIBLE_INVENTORY_DIR}}/hosts.yml {{.ANSIBLE_PLAYBOOK_DIR}}/k3s-nuke.yml
|
||||
- defer: ansible kubernetes -i {{.ANSIBLE_INVENTORY_DIR}}/hosts.yml -a '/usr/bin/systemctl reboot' --become
|
||||
|
||||
ping:
|
||||
desc: Ping all the hosts
|
||||
dir: provision/ansible
|
||||
cmds:
|
||||
- ansible all -i {{.ANSIBLE_INVENTORY_DIR}}/hosts.yml --one-line -m 'ping'
|
||||
|
||||
uptime:
|
||||
desc: Uptime of all the hosts
|
||||
dir: provision/ansible
|
||||
cmds:
|
||||
- ansible all -i {{.ANSIBLE_INVENTORY_DIR}}/hosts.yml --one-line -a 'uptime'
|
||||
|
||||
reboot:
|
||||
desc: Reboot all the k8s nodes
|
||||
dir: provision/ansible
|
||||
cmds:
|
||||
- ansible kubernetes -i {{.ANSIBLE_INVENTORY_DIR}}/hosts.yml -a '/usr/bin/systemctl reboot' --become
|
||||
|
||||
poweroff:
|
||||
desc: Shutdown all the k8s nodes
|
||||
dir: provision/ansible
|
||||
cmds:
|
||||
- ansible kubernetes -i {{.ANSIBLE_INVENTORY_DIR}}/hosts.yml -a '/usr/bin/systemctl poweroff' --become
|
||||
@@ -7,6 +7,7 @@ tasks:
|
||||
desc: Initialize pre-commit hooks
|
||||
cmds:
|
||||
- pre-commit install --install-hooks
|
||||
|
||||
run:
|
||||
desc: Run pre-commit
|
||||
cmds:
|
||||
File renamed without changes.
@@ -1,67 +0,0 @@
|
||||
---
|
||||
version: "3"
|
||||
|
||||
env:
|
||||
ANSIBLE_CONFIG: "{{.PROJECT_DIR}}/ansible.cfg"
|
||||
|
||||
vars:
|
||||
ANSIBLE_PLAYBOOK_DIR: "{{.ANSIBLE_DIR}}/playbooks"
|
||||
ANSIBLE_INVENTORY_DIR: "{{.ANSIBLE_DIR}}/inventory"
|
||||
|
||||
tasks:
|
||||
|
||||
init:
|
||||
desc: Upgrade Ansible galaxy deps
|
||||
dir: provision/ansible
|
||||
cmds:
|
||||
- "ansible-galaxy install -r requirements.yml --roles-path ~/.ansible/roles --force"
|
||||
- "ansible-galaxy collection install -r requirements.yml --collections-path ~/.ansible/collections --force"
|
||||
|
||||
list:
|
||||
desc: List all the hosts
|
||||
dir: provision/ansible
|
||||
cmds:
|
||||
- "ansible all -i {{.ANSIBLE_INVENTORY_DIR}}/hosts.yml --list-hosts"
|
||||
|
||||
prepare:
|
||||
desc: Prepare all the k8s nodes for running k3s
|
||||
dir: provision/ansible
|
||||
cmds:
|
||||
- "ansible-playbook -i {{.ANSIBLE_INVENTORY_DIR}}/hosts.yml {{.ANSIBLE_PLAYBOOK_DIR}}/ubuntu-prepare.yml"
|
||||
|
||||
install:
|
||||
desc: Install Kubernetes on the nodes
|
||||
dir: provision/ansible
|
||||
cmds:
|
||||
- "ansible-playbook -i {{.ANSIBLE_INVENTORY_DIR}}/hosts.yml {{.ANSIBLE_PLAYBOOK_DIR}}/k3s-install.yml"
|
||||
|
||||
nuke:
|
||||
desc: Uninstall Kubernetes on the nodes
|
||||
dir: provision/ansible
|
||||
cmds:
|
||||
- "ansible-playbook -i {{.ANSIBLE_INVENTORY_DIR}}/hosts.yml {{.ANSIBLE_PLAYBOOK_DIR}}/k3s-nuke.yml"
|
||||
- "ansible kubernetes -i {{.ANSIBLE_INVENTORY_DIR}}/hosts.yml -a '/usr/bin/systemctl reboot' --become"
|
||||
|
||||
ping:
|
||||
desc: Ping all the hosts
|
||||
dir: provision/ansible
|
||||
cmds:
|
||||
- "ansible all -i {{.ANSIBLE_INVENTORY_DIR}}/hosts.yml --one-line -m 'ping'"
|
||||
|
||||
uptime:
|
||||
desc: Uptime of all the hosts
|
||||
dir: provision/ansible
|
||||
cmds:
|
||||
- ansible all -i {{.ANSIBLE_INVENTORY_DIR}}/hosts.yml --one-line -a 'uptime'
|
||||
|
||||
reboot:
|
||||
desc: Reboot all the k8s nodes
|
||||
dir: provision/ansible
|
||||
cmds:
|
||||
- "ansible kubernetes -i {{.ANSIBLE_INVENTORY_DIR}}/hosts.yml -a '/usr/bin/systemctl reboot' --become"
|
||||
|
||||
poweroff:
|
||||
desc: Shutdown all the k8s nodes
|
||||
dir: provision/ansible
|
||||
cmds:
|
||||
- "ansible kubernetes -i {{.ANSIBLE_INVENTORY_DIR}}/hosts.yml -a '/usr/bin/systemctl poweroff' --become"
|
||||
Reference in new issue
Block a user