Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Add ansible variable module #1224

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

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.

None yet

3 participants