[kolla][kolla-ansible] Python dependency handling in custom Ansible module without toolbox
Hi everyone, I'm developing a new Ansible module for one of the kolla-ansible roles, and it depends on a Python package that needs to be installed via pip on the target nodes. I understand that Kolla Ansible generally avoids installing Python packages directly on hosts, and prefers handling such dependencies through the kolla_toolbox container. However, in my case: - Deploying a sidecar container isn't feasible within our current architecture - Delegating execution to localhost or kolla_toolbox would introduce complexity that we’d rather avoid Given these considerations, I'm looking for alternative ways to handle this dependency while staying aligned with Kolla's principles of reproducibility and container isolation. Has anyone faced a similar situation or found a clean workaround? Is using kolla-toolbox the only standard and recommended approach in such cases? Thanks a lot for your help and feedback!
Hi, Installing any packages on target nodes is an infrastructure-like task. Kolla-ansible is the framework used to install OpenStack on those nodes. Have a look at the Kayobe project (https://docs.openstack.org/kayobe), which uses Kolla-Ansible for deploying OpenStack, and has tasks for using infrastructure. On Mon, Sep 22, 2025 at 2:57 PM <sarah.kh09@gmail.com> wrote:
Hi everyone, I'm developing a new Ansible module for one of the kolla-ansible roles, and it depends on a Python package that needs to be installed via pip on the target nodes. I understand that Kolla Ansible generally avoids installing Python packages directly on hosts, and prefers handling such dependencies through the kolla_toolbox container. However, in my case: - Deploying a sidecar container isn't feasible within our current architecture - Delegating execution to localhost or kolla_toolbox would introduce complexity that we’d rather avoid Given these considerations, I'm looking for alternative ways to handle this dependency while staying aligned with Kolla's principles of reproducibility and container isolation. Has anyone faced a similar situation or found a clean workaround? Is using kolla-toolbox the only standard and recommended approach in such cases?
Thanks a lot for your help and feedback!
-- Regards, Maksim Malchuk
Thanks Maksim, That’s helpful — I’ll check out Kayobe and see if it fits our setup. I was trying to keep everything inside Kolla-Ansible, but now I see that installing packages on hosts is an infrastructure task. Your suggestion seems to be the most in line with Kolla’s philosophy. Another option I’m thinking about is rewriting the module as pure Ansible tasks, so it won’t need any external Python packages. Thanks again for your help!
participants (2)
-
Maksim Malchuk
-
sarah.kh09@gmail.com