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

Generate diff for all modules #440

Open
jooola opened this issue Jan 15, 2024 · 1 comment
Open

Generate diff for all modules #440

jooola opened this issue Jan 15, 2024 · 1 comment
Labels
enhancement New feature or request pinned

Comments

@jooola
Copy link
Collaborator

jooola commented Jan 15, 2024

SUMMARY

Ansible is capable of printing diffs for before and after a module has run.

https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_checkmode.html#using-diff-mode

None of our modules implement this feature, which can be handy.

ISSUE TYPE
  • Feature Idea
ADDITIONAL INFORMATION

Most of the following steps are already implemented for the logic of our modules, only a few are missing to implement the diff:

  • Fetch the current state of the resource
  • TODO: Generate the result of the previous state and save it
  • Apply the requested changes if any, or create the resource if non-existent
  • TODO: Generate the result of the after state and save it
  • Generate the result of the state and return to the user

To simplify the implementation, a refactor might be needed to use the same structure on all our modules.

@jooola jooola added the enhancement New feature or request label Jan 15, 2024
Copy link

This issue has been marked as stale because it has not had recent activity. The bot will close the issue if no further action occurs.

@github-actions github-actions bot added the stale label Apr 15, 2024
@jooola jooola added pinned and removed stale labels Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request pinned
Projects
None yet
Development

No branches or pull requests

1 participant