diff --git a/changelogs/fragments/76433-get_url-document-check_mode.yml b/changelogs/fragments/76433-get_url-document-check_mode.yml new file mode 100644 index 00000000000..98ec834701a --- /dev/null +++ b/changelogs/fragments/76433-get_url-document-check_mode.yml @@ -0,0 +1,2 @@ +known_issues: +- get_url - document ``check_mode`` correctly with unreliable changed status (https://github.com/ansible/ansible/issues/65687). diff --git a/lib/ansible/modules/get_url.py b/lib/ansible/modules/get_url.py index c984e479258..405f8d0514c 100644 --- a/lib/ansible/modules/get_url.py +++ b/lib/ansible/modules/get_url.py @@ -23,7 +23,7 @@ description: - HTTP redirects can redirect from HTTP to HTTPS so you should be sure that your proxy environment for both protocols is correct. - From Ansible 2.4 when run with C(--check), it will do a HEAD request to validate the URL but - will not download the entire file or verify it against hashes. + will not download the entire file or verify it against hashes and will report incorrect changed status. - For Windows targets, use the M(ansible.windows.win_get_url) module instead. version_added: '0.6' options: @@ -190,7 +190,8 @@ extends_documentation_fragment: - action_common_attributes attributes: check_mode: - support: full + details: the changed status will reflect comparison to an empty source file + support: partial diff_mode: support: none platform: