Fixes #38335 - Adding Ansible Diff Mode to Ansible Job Templates#764
Open
bnerickson wants to merge 1 commit into
Open
Fixes #38335 - Adding Ansible Diff Mode to Ansible Job Templates#764bnerickson wants to merge 1 commit into
bnerickson wants to merge 1 commit into
Conversation
da9ff40 to
f396c83
Compare
This was referenced Mar 31, 2025
Contributor
Author
3 tasks
Contributor
|
Hi, it may take some time before we're able to start reviewing this PR. Thank you for your patience and understanding. |
Contributor
|
docs triage: @nofaralfasi Can you please review this PR? |
nofaralfasi
approved these changes
Jul 16, 2025
ofedoren
reviewed
Jul 22, 2025
Comment on lines
35
to
+37
| :check_mode => host.host_param('ansible_roles_check_mode'), | ||
| :job_check_mode => template_invocation.template.ansible_check_mode, | ||
| :job_diff_mode => template_invocation.template.ansible_diff_mode, |
Member
There was a problem hiding this comment.
Just looking at the pattern here: don't we need to add Nervermind, I found it in another PR.diff_mode here as well?..
Contributor
Author
|
Hi @nofaralfasi , I see this PR is approved. Is there anything pending before this PR may be merged? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview of Changes
This PR intends to add the Ansible Diff Mode (identified with the --diff argument to ansible-runner) to Ansible Job Templates via a checkbox option. This is a follow-on to the changes made to support Ansible Check Mode in https://projects.theforeman.org/issues/37942. Ansible Diff Mode reports changes Ansible tasks make only if the module supports Ansible Diff Mode. Otherwise, the task reports a change has been made with no further details. Note that when used in conjunction with Ansible Check Mode, tasks report changes they would have made without making those changes. Ansible Check Mode and Ansible Diff Mode are not dependent on one-another and can be run independently. Refer to https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_checkmode.html#using-diff-mode for more details about Ansible Diff Mode. See below screenshot for UI update:
Implementation Considerations
As suggested in #742, it would be beneficial to have this sort of capability at the job level. I may tackle that next.
Testing Steps
Checklists
Additional Notes
This PR is not dependent on any other changes. The follow PRs are dependent on this change: