From 16211e7dab20443bfc450afeee68c7c1dadca09d Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Wed, 15 Jun 2016 09:37:09 -0700 Subject: [PATCH] Check that required arguments src and dest are present. Fixes #16301 --- lib/ansible/plugins/action/synchronize.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/ansible/plugins/action/synchronize.py b/lib/ansible/plugins/action/synchronize.py index 7537c7cdd32..66a7fc0e203 100644 --- a/lib/ansible/plugins/action/synchronize.py +++ b/lib/ansible/plugins/action/synchronize.py @@ -266,6 +266,10 @@ class ActionModule(ActionBase): # MUNGE SRC AND DEST PER REMOTE_HOST INFO src = self._task.args.get('src', None) dest = self._task.args.get('dest', None) + if src is None or dest is None: + return dict(failed=True, + msg="synchronize requires both src and dest parameters are set") + if not dest_is_local: # Private key handling if use_delegate: