tasks.py: misc fixes
This commit is contained in:
parent
db55bfcb26
commit
e4c39c0af3
1 changed files with 5 additions and 6 deletions
11
tasks.py
11
tasks.py
|
@ -4,16 +4,18 @@ import json
|
||||||
import os
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
|
from pathlib import Path
|
||||||
from typing import Any, List
|
from typing import Any, List
|
||||||
|
|
||||||
from deploykit import DeployGroup, DeployHost
|
from deploykit import DeployGroup, DeployHost
|
||||||
from invoke import task
|
from invoke import task
|
||||||
|
|
||||||
|
ROOT = Path(__file__).parent.resolve()
|
||||||
|
os.chdir(ROOT)
|
||||||
|
|
||||||
|
# Deploy to all hosts in parallel
|
||||||
def deploy_nixos(hosts: List[DeployHost]) -> None:
|
def deploy_nixos(hosts: List[DeployHost]) -> None:
|
||||||
"""
|
|
||||||
Deploy to all hosts in parallel
|
|
||||||
"""
|
|
||||||
g = DeployGroup(hosts)
|
g = DeployGroup(hosts)
|
||||||
|
|
||||||
res = subprocess.run(
|
res = subprocess.run(
|
||||||
|
@ -108,7 +110,6 @@ def update_sops_files(c):
|
||||||
"""
|
"""
|
||||||
Update all sops yaml and json files according to .sops.yaml rules
|
Update all sops yaml and json files according to .sops.yaml rules
|
||||||
"""
|
"""
|
||||||
|
|
||||||
c.run(
|
c.run(
|
||||||
"""
|
"""
|
||||||
find . \
|
find . \
|
||||||
|
@ -124,8 +125,6 @@ def scan_age_keys(c, host):
|
||||||
"""
|
"""
|
||||||
Scans for the host key via ssh an converts it to age. Use inv scan-age-keys build**.nix-community.org
|
Scans for the host key via ssh an converts it to age. Use inv scan-age-keys build**.nix-community.org
|
||||||
"""
|
"""
|
||||||
import subprocess
|
|
||||||
|
|
||||||
proc = subprocess.run(
|
proc = subprocess.run(
|
||||||
["ssh-keyscan", host], stdout=subprocess.PIPE, text=True, check=True
|
["ssh-keyscan", host], stdout=subprocess.PIPE, text=True, check=True
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue