deploy: improve rsync filter
This commit is contained in:
parent
053daefbf4
commit
6d32ac1baa
1 changed files with 3 additions and 1 deletions
4
tasks.py
4
tasks.py
|
@ -8,6 +8,8 @@ from deploy_nixos import DeployHost, DeployGroup
|
||||||
import subprocess
|
import subprocess
|
||||||
import json
|
import json
|
||||||
|
|
||||||
|
RSYNC_EXCLUDES = [".terraform", ".direnv", ".mypy-cache", ".git"]
|
||||||
|
|
||||||
|
|
||||||
def deploy_nixos(hosts: List[DeployHost]) -> None:
|
def deploy_nixos(hosts: List[DeployHost]) -> None:
|
||||||
"""
|
"""
|
||||||
|
@ -17,7 +19,7 @@ def deploy_nixos(hosts: List[DeployHost]) -> None:
|
||||||
|
|
||||||
def deploy(h: DeployHost) -> None:
|
def deploy(h: DeployHost) -> None:
|
||||||
h.run_local(
|
h.run_local(
|
||||||
f"rsync --exclude='.git/' -vaF --delete -e ssh . {h.user}@{h.host}:/etc/nixos",
|
f"rsync {' --exclude '.join([''] + RSYNC_EXCLUDES)} -vaF --delete -e ssh . {h.user}@{h.host}:/etc/nixos"
|
||||||
)
|
)
|
||||||
|
|
||||||
config = (
|
config = (
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue