/rw/config/rc.conf.d contains scripts that should be run during vm start.
This folder is persistent for each vm.
I’m curious if there is a recommended way to create rc scripts that will be located in Template vm and will be executed in each AppVM on the start.
I see something like this to be very handy for config file update. If I use one common TemplateVM to work on many different projects in separate AppVM, I need simple way to update my vim config file without copying same config into 5-10 VM individually.
Just placing files in TemplateVM will not work for me, ass some apps wants configs in /home/user/.<fancy app name> or in other user folder.
Note that the payload can be base64/base32 encoded (or uuencoded, old-school; or xxd etc.) so you can transfer anything up to a few hundreds of kilobytes** and decode on the target AppVM/DispVM.
** if memory serves well. I tested and used this method in R4.2 and did not re-use the trick in R4.3
EDIT: fixed typo and added base64 because that’s what I meant and used.
I would like to learn how to use ansible to automate qubes vm management.
I did several attempts to do it, yet not a single one succeeded.
Even watched https://www.youtube.com/watch?v=Mqa-LBxObdY but it did not helped much. Probably I need to dig into forum for a few days to find out more about it or may be some merciful people can give me a link to a guide to go with.
I’ve ended up with systemd method.
Sims to be the simplest one.
/etc/systemd/system/config-my-system.service
[Unit]
Description=Configure my aps
After=local-fs.target
[Service]
User=<qubes user name>
Type=oneshot
ExecStart=<path to config script>
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
Also one important thing for the future generations.
Moving service file or script might make selinux unhappy on Fedora.
If you are not able to enable service with systemctl enable config-my-system try to do sudo restorecon -v /etc/systemd/system/config-my-system.service sudo systemctl daemon-reload might be helpful as well.
Hey! I am working on a simple to use salt module that does this exact thing (and does it in a clean fashion)! To my surprise the implementation was a bit trickier but manageable (I got a beta version implemented already working on my machine).
Right now it would be great if you could give it a look and tell me what you think!
Thanks for sharing.
I saw README, but as I remember, it was half a year or year ago, I got stuck on Management VM.
I did not figure out how to make it and gave up.
I will try one more time. Probably I should have not gave up so easily.