[SOLVED] Sync .zshrc cluster wide

May 21, 2020
54
14
13
36
Hi,

My backup servers are in a separate cluster on the same network as my Application Hosts, both proxmox clusters.
I want to be able to SSH to every Application Hypervisor and run "wakeup<MY_HOST_NAME>" to etherwake any backup server.

So I thought about making a zshrc and putting an alias to the etherwake command with correct arguments.
But I don't want to manually sync the zshrc to all cluster hosts everytime I edit.
Is there a way to let a proxmox service daemon replicated the zshrc across all cluster nodes when it changes?
 
The proper way is to use ansible or similar tool to distribute your changes.

There is no "supported" feature in proxmox that would replicate an arbitrary file.
You can try placing your file into /etc/pve and then symlink'ing from ~/ to /etc/pve/file.
Many things could go wrong: file will be unavailable if there is no quorum or cluster is down, you may not be able to login if file is not there, etc.
Do it at your own risk. If you look at /root/.ssh you will see an example.


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
  • Like
Reactions: codingspiderfox