Mercurial > code > home > repos > infra
annotate multikube_wipe.py @ 288:3af02e24eaf9
minor
author | drewp@bigasterisk.com |
---|---|
date | Sun, 21 Apr 2024 17:01:13 -0700 |
parents | 375515ab60ba |
children |
rev | line source |
---|---|
111 | 1 from pyinfra import host |
113
c520672d0930
closer to multi-node k3s working, but still doesn't quite network right
drewp@bigasterisk.com
parents:
111
diff
changeset
|
2 from pyinfra.operations import server, files |
111 | 3 |
113
c520672d0930
closer to multi-node k3s working, but still doesn't quite network right
drewp@bigasterisk.com
parents:
111
diff
changeset
|
4 from multikube_config import nodes, server_node |
111 | 5 |
113
c520672d0930
closer to multi-node k3s working, but still doesn't quite network right
drewp@bigasterisk.com
parents:
111
diff
changeset
|
6 if host.name in nodes + [server_node]: |
111 | 7 files.put(dest='/usr/local/bin/k3s-killall.sh', src='files/kube/k3s-killall.sh', mode='a+rx') |
8 files.put(dest='/usr/local/bin/k3s-uninstall.sh', src='files/kube/k3s-uninstall.sh', mode='a+rx') | |
288 | 9 server.shell(commands=['k3s-uninstall.sh']) |
136
375515ab60ba
multikube experiment junk. do not run
drewp@bigasterisk.com
parents:
113
diff
changeset
|
10 for n in ['k3s-agent.service', 'k3s-agent.service.env', 'k3s-node.service']: |
375515ab60ba
multikube experiment junk. do not run
drewp@bigasterisk.com
parents:
113
diff
changeset
|
11 files.file(path=f'/etc/systemd/system/{n}', present=False) |