-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhosts.yml
More file actions
29 lines (23 loc) · 1.18 KB
/
hosts.yml
File metadata and controls
29 lines (23 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# tasks that involve preparing and managing hosts
version: '3'
vars:
INVENTORY_PATH: '{{.INVENTORY_PATH | default "inventory/inventory.yaml"}}'
tasks:
apply-base:
interactive: true
desc: Performs base host configuration, including package installations, configuring SSH and zfs setup if applicable
cmds:
- ansible-playbook -vv launchpad-core/ansible/site.yaml --check --diff -i {{.INVENTORY_PATH}} {{.CLI_ARGS}}
- gum confirm "Simulated changes above. Are you sure you want to continue?"
- ansible-playbook -vv launchpad-core/ansible/site.yaml -i {{.INVENTORY_PATH}} {{.CLI_ARGS}}
apply-k0s:
interactive: true # for interactive scripts
desc: Joins all hosts into a K0s cluster as defined in the inventory
cmds:
- ansible-playbook -vv launchpad-core/ansible/install_k0s_cluster.yaml --diff -i {{.INVENTORY_PATH}} {{.CLI_ARGS}}
k0s-node-upgrade:
interactive: true # for interactive scripts
desc: Safely upgrade the version of a k0s node in a cluster
cmds:
- ansible-playbook -vv launchpad-core/ansible/upgrade.yaml --diff -i {{.INVENTORY_PATH}} {{.CLI_ARGS}}
# k0s-sysinfo: # TODO add task for running k0s sysinfo on a host/hosts