You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be useful for script / shell / command (and similar) tasks to be able to specify a diff for output in diff mode.
Currently, in order to In order to get diff output out of a script, shell or command task, I need to:
pass in ansible_diff_mode to indicate whether diff output should be produced (optional)
(produce the diff output in the script/shell/command - this is expected)
register the result of the task
use a separate task to print out the result
The requested feature would allow removal of the last two steps; instead, it would be a keyword like changed_diff: result.stdout or changed_diff: "{{ result.stdout }}"
This would be analogous to the existing failed_when and changed_when keywords
However, we're absolutely always up for discussion.
Because this project is very active, we're unlikely to see comments made on closed tickets and we lock them after some time.
If you or anyone else has any further questions, please let us know by using any of the communication methods listed in the page below:
In the future, sometimes starting a discussion on the development list prior to implementing a feature can make getting things included a little easier, but it's not always necessary.
Thank you once again for this and your interest in Ansible!
Summary
It would be useful for script / shell / command (and similar) tasks to be able to specify a diff for output in diff mode.
Currently, in order to In order to get diff output out of a script, shell or command task, I need to:
The requested feature would allow removal of the last two steps; instead, it would be a keyword like
changed_diff: result.stdout
orchanged_diff: "{{ result.stdout }}"
This would be analogous to the existing
failed_when
andchanged_when
keywordsIssue Type
Feature Idea
Component Name
ansible
Additional Information
Example use:
Code of Conduct
The text was updated successfully, but these errors were encountered: