[tripleo][ansible] the current action plugins use patterns are suboptimal?

Sagi Shnaidman sshnaidm at redhat.com
Mon Aug 3 10:36:12 UTC 2020


Hi, Bogdan

thanks for raising this up, although I'm not sure I understand what it is
the problem with using action plugins.
Action plugins are well known official extensions for Ansible, as any other
plugins - callback, strategy, inventory etc [1]. It is not any hack or
unsupported workaround, it's a known and official feature of Ansible. Why
can't we use it? What makes it different from filter, lookup, inventory or
any other plugin we already use?
Action plugins are also used wide in Ansible itself, for example templates
plugin is implemented with action plugin [2]. If Ansible can use it, why
can't we? I don't think there is something with "fixing" Ansible, it's not
a bug, this is a useful extension.
What regards the mentioned action plugin for podman containers, it allows
to spawn containers remotely while skipping the connection part for every
cycle. I'm not sure you can "fix" Ansible not to do that, it's not a bug.
We may not see the difference in a few hosts in CI, but it might be very
efficient when we deploy on 100+ hosts oro even 1000+ hosts. In order to
evaluate this on bigger setups to understand its value we configured both
options - to use action plugin or usual module.
If better performance of action plugin will be proven, we can switch to use
it, if it doesn't make a difference on bigger setups - then I think we can
easily switch back to using an usual module.

Thanks

[1] https://docs.ansible.com/ansible/latest/plugins/plugins.html
[2]
https://github.com/ansible/ansible/blob/devel/lib/ansible/plugins/action/template.py

On Mon, Aug 3, 2020 at 11:19 AM Bogdan Dobrelya <bdobreli at redhat.com> wrote:

> There is a trend of writing action plugins, see [0], for simple things,
> like just calling a module in a loop. I'm not sure that is the direction
> TripleO should go. If ansible is inefficient in this sort of tasks
> without custom python code written, we should fix ansible. Otherwise,
> what is the ultimate goal of that trend? Is that having only action
> plugins in roles and playbooks?
>
> Please kindly asking the community to stop that, make a step back and
> reiterate with the taken approach. Thank you.
>
> [0] https://review.opendev.org/716108
>
>
> --
> Best regards,
> Bogdan Dobrelya,
> Irc #bogdando
>
>
>

-- 
Best regards
Sagi Shnaidman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-discuss/attachments/20200803/9cfbc85b/attachment-0001.html>


More information about the openstack-discuss mailing list