Upon running some tasks I need to manipulate Ansible host variables.
I created a dynamic inventory script that could support thata functionality and then I stucked:
- inventory modules support only add_host which works only in-memory
- I see no sign that ansible is capable of doing this: everything points to inventory providers like Tower, EC2, vagrant and Cobbler
- I found one suggestion to handle inventory manipulation outside ansible
I can create a solution that could handle the new parameters in-memory and then call my inventory script and update it at the end of playbook run. But I’m thinking: is it so weird idea?
Why haven’t it designed this way? Or am I missing something?