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 subprocess
|
||||
import sys
|
||||
from pathlib import Path
|
||||
from typing import Any, List
|
||||
|
||||
from deploykit import DeployGroup, DeployHost
|
||||
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:
|
||||
"""
|
||||
Deploy to all hosts in parallel
|
||||
"""
|
||||
|
||||
g = DeployGroup(hosts)
|
||||
|
||||
res = subprocess.run(
|
||||
|
@ -108,7 +110,6 @@ def update_sops_files(c):
|
|||
"""
|
||||
Update all sops yaml and json files according to .sops.yaml rules
|
||||
"""
|
||||
|
||||
c.run(
|
||||
"""
|
||||
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
|
||||
"""
|
||||
import subprocess
|
||||
|
||||
proc = subprocess.run(
|
||||
["ssh-keyscan", host], stdout=subprocess.PIPE, text=True, check=True
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue