[SOLVED] Sync .zshrc cluster wide

May 21, 2020
54
9
13
35
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

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!