summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Sprygada <privateip@users.noreply.github.com>2016-09-23 09:24:30 -0400
committerGitHub <noreply@github.com>2016-09-23 09:24:30 -0400
commitb5b8a756fcc3b99d9e05c110ed145aa916c9c43f (patch)
tree73ba502357f3a5258221cbb0ca4e4c692fb50377
parent4c9ed1f4fb7331a3b9c256987aa3a2a3c665abad (diff)
downloadansible-b5b8a756fcc3b99d9e05c110ed145aa916c9c43f.tar.gz
fixes issue with net_template failing unless src argument provided. (#17726)
This fixes an issue where the net_template action will fail if a non required argument (src) is not provided. fixes ansible/ansible-modules-core#4978
-rw-r--r--lib/ansible/plugins/action/net_template.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/ansible/plugins/action/net_template.py b/lib/ansible/plugins/action/net_template.py
index 3d27cac5f2..b852309147 100644
--- a/lib/ansible/plugins/action/net_template.py
+++ b/lib/ansible/plugins/action/net_template.py
@@ -75,6 +75,9 @@ class ActionModule(ActionBase):
def _handle_template(self):
src = self._task.args.get('src')
+ if not src:
+ return
+
working_path = self._get_working_path()
if os.path.isabs(src) or urlparse.urlsplit('src').scheme: