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

return diff information in file module touch operation in check_mode #55011

Open
wants to merge 2 commits into
base: devel
Choose a base branch
from

Conversation

@Turgon37
Copy link
Contributor

@Turgon37 Turgon37 commented Apr 8, 2019

SUMMARY

Add diff and result informations on file module with state "touch" even in check mode

fixes #50452

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

lib/ansible/modules/files/file.py

ADDITIONAL INFORMATION
@bcoca bcoca changed the title modules/files : Fill result in touch check mode, fix #50452 return diff information in file module touch operation in check_mode Apr 9, 2019
@bcoca bcoca removed the needs_triage label Apr 9, 2019
@samdoran
Copy link
Member

@samdoran samdoran commented Apr 9, 2019

Please create a changelog fragment. See this fragment as an example.

@Turgon37 Turgon37 force-pushed the Turgon37:feature/50452 branch to 3a9b269 Apr 9, 2019
else:
diff = initial_diff(path, 'touch', prev_state)
# Even if check_mode = True, touch always changes the file because it updates its timestamp
result['changed'] = True

This comment has been minimized.

@s-hertel

s-hertel Apr 16, 2019
Contributor

If the access_time and modification_time options are set to "preserve", check mode is still going to show changed=True, even though no change will be made without check mode.

@Akasurde
Copy link
Member

@Akasurde Akasurde commented Jun 18, 2020

@Turgon37 Are you still working on this? Thanks.

needs_info

@Turgon37
Copy link
Contributor Author

@Turgon37 Turgon37 commented Jun 20, 2020

Hello yes It's in my todo list :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

6 participants