Re: [ansible-devel] Support for functions for complex expressions

2022-07-13 Thread Roy Lenferink
Thanks for the link Brian! I experimented a bit with macros but couldn't find a working solution. These are the lines I would like to have available in a macro: https://github.com/rlenferink/ansible-function-test/blob/9c83a40a29eb616a59b4da713771545a2aa44f32/playbook.yml#L15-L16 Knowing that

Re: [ansible-devel] Re: A more extensible ActionModule: Split _configure_module

2022-07-13 Thread Raphaƫl
> > Also note that while run_command is used by some modules, the vast > majority use APIs instead of running commands, so become is more > geared to running the modules themselves [...] > what you ask for is not w/o reason, it is a niche use for a minority of > modules and pushes > against the

Re: [ansible-devel] Re: A more extensible ActionModule: Split _configure_module

2022-07-13 Thread Brian Coca
I understand the request, but the push is to separate those concerns as both from a security and simplicity perspective, action plugins should not be able or care about 'become settings', much less take part in manipulating module input. Also note that while run_command is used by some modules,

Re: [ansible-devel] Support for functions for complex expressions

2022-07-13 Thread Brian Coca
Jinja2 has this already, macros https://jinja.palletsprojects.com/en/2.10.x/templates/#macros -- -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Development" group. To unsubscribe from this group and stop receiving emails from it,