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
from

Conversation

Projects
None yet
5 participants
@Turgon37
Copy link

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

This comment has been minimized.

Copy link
Member

commented Apr 9, 2019

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

@Turgon37 Turgon37 force-pushed the Turgon37:feature/50452 branch from e652528 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.

Copy link
@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.

@ansibot ansibot added needs_revision and removed core_review labels Apr 16, 2019

@ansibot ansibot added the stale_ci label Apr 24, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.