edit lxc config and fix path
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Mathieu Broillet 2023-06-13 16:39:20 +02:00
parent 85329abf4b
commit 2e70f64269
No known key found for this signature in database
GPG Key ID: 7D4F25BC50A0AA32
3 changed files with 9 additions and 4 deletions

View File

@ -36,9 +36,14 @@
"steps": [
{
"type": "script",
"path": "/global/install-docker.sh"
"local_path": "global/scripts/install-docker.sh"
},
{
"type": "folder_copy",
"path": "data/",
"destination": "/var/"
}
]
},
"deploy": []
"deploy": {}
}

View File

@ -71,7 +71,7 @@ def _run_local_script_on_lxc(lxc: LXC, path: Path):
"""
# Copy the script to /tmp and run it from there
proxmox_utils.copy_file_to_lxc(lxc.get_id(), str(path), "/tmp/pdj-scripts/")
proxmox_utils.copy_file_to_lxc(lxc.get_id(), path, "/tmp/pdj-scripts/")
lxc.run_command(f"bash /tmp/pdj-scripts/{path.name}")
# with open(path, "r") as file:

View File

@ -347,7 +347,7 @@ def copy_file_to_pve(path: Path, destination: str):
"""
config = get_config()
run_command_locally(f"scp {str(path)} {config['pve']['root']}@{config['pve']['host']}:{destination}")
run_command_locally(f"scp {str(path)} {config['pve']['user']}@{config['pve']['host']}:{destination}")
def copy_file_to_lxc(lxc_id: int, path: Path, destination: str):