[kolla] Calling Kolla-ansible in an ansible playbook

J-P Methot jp.methot at planethoster.info
Wed Jan 19 17:04:39 UTC 2022


Thank you.

To be honest I'm only testing options right now, in part to satisfy our 
curiosity. I will keep your recommendation in mind though.

On 1/19/22 4:37 AM, Mark Goddard wrote:
> 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.
>>
>>
-- 
Jean-Philippe Méthot
Senior Openstack system administrator
Administrateur système Openstack sénior
PlanetHoster inc.




More information about the openstack-discuss mailing list