get_url: return no change in check mode when checksum matches (#53070)

Signed-off-by: Tony Finch <dot@dotat.at>
This commit is contained in:
Tony Finch
2019-03-01 09:53:28 +00:00
committed by John R Barker
parent 00efa26cdb
commit ccad79d162
2 changed files with 20 additions and 6 deletions

View File

@@ -268,6 +268,19 @@
that:
- result is not changed
- name: test checksum match in check mode
get_url:
url: 'https://{{ httpbin_host }}/get'
dest: '{{ remote_tmp_dir }}/test'
checksum: 'sha256:7036ede810fad2b5d2e7547ec703cae8da61edbba43c23f9d7203a0239b765c4.'
check_mode: True
register: result
- name: Assert that check mode was green
assert:
that:
- result is not changed
# https://github.com/ansible/ansible/issues/27617
- name: set role facts