I’am trying on my %post to run ansible-galaxy but find it hard as it will drop this error:
/mnt/sysimage/bin/ansible-galaxy: /usr/bin/python3.9: bad interpreter: No such file or directory
On my package part have added python3 and this is appearing under
/mnt/sysimage/bin/python3.9
my guess for this error is that ansible-galaxy is looking for python and not finding it under /usr/bin
Don’t really know best solution for this. Came up with link the one from /mnt to /usr and solve this with by changing the interpreter… So i have now this:
Like I wrote in that other thread, the ansible* should probably run within the chroot, in the “installed system”. That way it sees the libraries that were installed from dependent packages, and the files written go to the installed system, not to the “/” of the install environment.
If you have input files in the install media, then copy them first, before chrooting. (If you have custom image, then you could have the input files as a RPM package that is installed with the rest.)
Note also that EPEL has package ansible that provides some Ansible collections (and some more in ansible-* packages). That way you may be able to install required collections without running ansible-galaxy at all.