PVE 6 is there a way to push a file to multiple container ?

popallo

Well-Known Member
Jul 2, 2019
36
6
48
France
apacher.eu
Hello everyone, everything is in the title :)

So you'll understand I'm looking for a way (simple if possible of course) to copy or edit the same file on multiple containers (lxc).

I set up several containers that do the same thing and for which I would like to edit at the same time.

If someone has ever had to do this kind of manipulation or has an idea of how to do it I'm interested :)

Thank you in advance to all.



Pop
 
Hi,
what you describe sounds like a case for a template. You can configure a basic CT setup as you like and convert that to a template. Then you can create multiple linked clones from that template.
 
  • Like
Reactions: popallo
Hi,
what you describe sounds like a case for a template. You can configure a basic CT setup as you like and convert that to a template. Then you can create multiple linked clones from that template.

hello @Chris and thx for your answer.

So it's an idea but it's not really what I'm looking for.

In fact they are containers in production for which, at a given moment, I want to change a configuration element following research and tests that I do on development containers.

Once my probing tests I will like to deploy my modification on the different production containers. I do not know if I am very clear :)
 
Then you could simply create a shell script which copies the files you want to change over to each container via ssh? Or maybe https://www.ansible.com/
 
  • Like
Reactions: popallo
Then you could simply create a shell script which copies the files you want to change over to each container via ssh? Or maybe https://www.ansible.com/

@Chris yes I was thinking about the shell script but I thought that it existed natively except that it does not seem to be the case :) or I thought maybe someone here has already had the case and has something functional.

It is something that could be interesting in any case, since it is easily possible to push a file to a specific container.

As for ansible I do not know too much, so I will rtfm ;).

I will come back here if I get a convincing result.

Thx for the answer :)