From 43a7f11e34a5c1a546a7bd547a9c5a6379cfa2e3 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Tue, 11 Oct 2022 15:09:02 +0200 Subject: =?UTF-8?q?fetch=5Fcmd:=20Replace=20deprecated=20=E2=80=98=5Fremot?= =?UTF-8?q?e=5Fchecksum()=E2=80=99=20with=20=E2=80=98=5Fexecute=5Fremote?= =?UTF-8?q?=5Fstat()=E2=80=99.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This silences the following deprecation warning: The '_remote_checksum()' method is deprecated. The plugin author should update the code to use '_execute_remote_stat()' instead. This feature will be removed in version 2.16. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg. --- lib/action_plugins/fetch_cmd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/action_plugins/fetch_cmd.py b/lib/action_plugins/fetch_cmd.py index 57d7220..93960eb 100644 --- a/lib/action_plugins/fetch_cmd.py +++ b/lib/action_plugins/fetch_cmd.py @@ -50,7 +50,7 @@ class ActionModule(ActionBase): local_checksum = checksum(dest) # calculate checksum for the remote file, don't bother if using become as slurp will be used - remote_checksum = self._remote_checksum(stdout, all_vars=task_vars) + remote_checksum = self._execute_remote_stat(stdout, all_vars=task_vars, follow=True).get('checksum') if remote_checksum != local_checksum: makedirs_safe(os.path.dirname(dest)) -- cgit v1.2.3