EdgeOS module improvements (#39530)

* Update docs and use to_text on strings

* Add warning to use network_cli
This commit is contained in:
Sam Doran 2018-05-22 12:22:18 -04:00 committed by GitHub
parent e8d02a3a0f
commit d5dbd8c76d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 22 additions and 10 deletions

View file

@ -35,6 +35,8 @@ PRIVATE_KEYS_RE = re.compile('__.+__')
class ActionModule(_ActionModule):
def run(self, tmp=None, task_vars=None):
if self._play_context.connection != 'network_cli':
return {'failed': True, 'msg': 'Connection type %s is not valid for this module. Must use network_cli.' % self._play_context.connection}
if self._task.args.get('src'):
try: