From c056b8a35c0bfa6780822bcafc5a2aa13bbbf080 Mon Sep 17 00:00:00 2001 From: Jordan Borean Date: Tue, 3 Apr 2018 06:31:07 +1000 Subject: [PATCH] win_reboot: backport warning message arguments (#37971) * win_reboot: fixed up warning message for dep args (#37898) (cherry picked from commit c4e7b54630ca12db63f6752b93fa62fd9351f209) * Added changelog fragment --- changelogs/fragments/win_reboot-warning-message-fix.yaml | 3 +++ lib/ansible/plugins/action/win_reboot.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/win_reboot-warning-message-fix.yaml diff --git a/changelogs/fragments/win_reboot-warning-message-fix.yaml b/changelogs/fragments/win_reboot-warning-message-fix.yaml new file mode 100644 index 00000000000..7f5fe65ba0c --- /dev/null +++ b/changelogs/fragments/win_reboot-warning-message-fix.yaml @@ -0,0 +1,3 @@ +bugfixes: +- win_reboot - fix deprecated warning message to show version in correct spot + https://github.com/ansible/ansible/pull/37898 diff --git a/lib/ansible/plugins/action/win_reboot.py b/lib/ansible/plugins/action/win_reboot.py index eccce679a10..015c15ef978 100644 --- a/lib/ansible/plugins/action/win_reboot.py +++ b/lib/ansible/plugins/action/win_reboot.py @@ -85,7 +85,7 @@ class ActionModule(ActionBase): } for arg, version in deprecated_args.items(): if self._task.args.get(arg) is not None: - display.warning("Since Ansible %s, %s is no longer used with win_reboot" % (arg, version)) + display.warning("Since Ansible %s, %s is no longer used with win_reboot" % (version, arg)) if self._task.args.get('connect_timeout') is not None: connect_timeout = int(self._task.args.get('connect_timeout', self.DEFAULT_CONNECT_TIMEOUT))