Files missing after OS install

Hi all,

i’m currently on a crusade for running the configuration i need, ansible-galaxy and python 3.9
During the install and using a custom kickstart i can’t run ansible, as anaconda-platform is 3.6. I could give a try changing this but got 0 idea on how. So i came with the idea of making a script and get it running by the systemctl on boot… but to my surprise the OS clear the files i have added during the install and the service is nowhere to be found after the reboot. The install has been completed successfully and no errors come up, so find it weird that the files are there when i do this for example:

%post --nochroot --erroronfail --log=/root/ks-post.log
mkdir -p /opt/ansible-site/files/cert/_common
cp /run/install/repo/.ansible_vault_password /opt/ansible-site/

But once the server restarts and i login as root or user they are no where to be found. I would appreciate any kind of hint or help. How can i keep the files from dissapearing?

Many Thanks.

You don’t chroot for the post%.
Therefore, the installed system’s ‘/’ is seen as /mnt/sysimage/ during your commands.

Logically,

mkdir -p /mnt/sysimage/opt/ansible-site/files/cert/_common
cp /run/install/repo/.ansible_vault_password /mnt/sysimage/opt/ansible-site/

Got to look for the mount point and then save files acordingly, also look for fails during install.

cp /run/install/sources/mount-0000-hdd-device/.ansible_vault_password /mnt/sysroot/opt/dn/ansible-site/