Skip to content

Conversation

@cru90
Copy link

@cru90 cru90 commented May 11, 2021

[WIP] Add a module to add, manage, change and delete variables for Ansible roles within foreman.

This module is thought to manage Ansible variables for already imported Ansible roles. It is a work in progress with some issues, but I think it might still be worth sharing. Perhaps someone can help me?

At the moment, if two different Ansible roles posses variables with identical names, the module does not distinguish between these variables, but will only affect one.. This results in undesired behavior like assigning a value to the wrong variable.

Furthermore, the module seems to loose its idempotency, if variable data types array, hash, yaml or json are used. Even if no changes are applied, the corresponding tasks are always marked as 'changed'.

Add a module to add, manage, change and delete variables for ansible
roles within foreman.
@mdellweg
Copy link
Member

Good start. I don't see right away what is happening with the non string content types. And i would suggest that the handling should be similar to that of global_parameters.
To bring this forward. Can you add a test playbook please? I can vastly help to understand and reproduce what's going on. And in the end you need it anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants