[kolla] Calling Kolla-ansible in an ansible playbook

Mark Goddard mark at stackhpc.com
Wed Jan 19 09:37:17 UTC 2022


Use the shell module, then activate the virualenv first before running
kolla-ansible.

However, I'd argue against running Ansible in Ansible. It can be had
enough to read the output when troubleshooting, without nesting it.
Kayobe intentionally avoided this, instead adding a python CLI that
calls out to kayobe and kolla-ansible.

Mark

On Tue, 18 Jan 2022 at 21:32, J-P Methot <jp.methot at planethoster.info> wrote:
>
> Hi,
>
> I've been trying to write an ansible-playbook to run some kolla tasks
> and I've been wondering if this is even possible? I have kolla running
> inside a virtual environment, so of course  I'm running into issues
> having ansible running it. The current task looks like this:
>
>   - name: run kolla-ansible upgrade on controllers
>     command: "{{ venv }}/bin/kolla-ansible --limit {{ item }} -i
> multinode upgrade"
>     loop:
>       - control
>       - monitoring
>       - storage
>
> When run, it's complaining that ansible isn't installed in the current
> virtual environment. I was under the impression that specifying the
> whole path to my executable would have it automatically run in that
> virtual environment, but visibly this excludes access to ansible that's
> installed there.
>
> So, basically, is what I'm trying to do even possible? And if so, what
> would be the best way to do it?
>
> --
> Jean-Philippe Méthot
> Senior Openstack system administrator
> Administrateur système Openstack sénior
> PlanetHoster inc.
>
>



More information about the openstack-discuss mailing list