updates network local actions to check for connection=local (#21437)

* updates vyos local action
* updates ios local action
This commit is contained in:
Peter Sprygada 2017-02-15 06:27:54 -05:00 committed by John R Barker
parent 86e2feffc1
commit 381a045089
2 changed files with 26 additions and 9 deletions

View file

@ -35,6 +35,13 @@ class ActionModule(_ActionModule):
def run(self, tmp=None, task_vars=None):
if self._play_context.connection != 'local':
return dict(
fail=True,
msg='invalid connection specified, expected connection=local, '
'got %s' % self._play_context.connection
)
provider = self.load_provider()
pc = copy.deepcopy(self._play_context)