From 877897dc1a1e018d2bbf1a217a9f32cae900aea9 Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Fri, 24 Feb 2017 13:40:57 -0500 Subject: [PATCH] Fix keyerror with synchronize Apparently we may need to initialize the option if it isn't present. Change-Id: I4a9f4f2ace3aeb914feba868e2ac8a86223232be --- zuul/ansible/action/synchronize.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/zuul/ansible/action/synchronize.py b/zuul/ansible/action/synchronize.py index 88ca13a185..fa3d051961 100644 --- a/zuul/ansible/action/synchronize.py +++ b/zuul/ansible/action/synchronize.py @@ -26,6 +26,8 @@ class ActionModule(synchronize.ActionModule): dest = self._task.args.get('dest', None) pull = self._task.args.get('pull', False) + if 'rsync_opts' not in self._task.args: + self._task.args['rsync_opts'] = [] if '--safe-links' not in self._task.args['rsync_opts']: self._task.args['rsync_opts'].append('--safe-links')