Skip to content

Commit

Permalink
adding name option for textfsm to create facts to key
Browse files Browse the repository at this point in the history
Signed-off-by: jwoogee <jswoods1@gmail.com>
  • Loading branch information
jwoogee committed Nov 23, 2018
1 parent 6d2643b commit 0d2cff2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion action_plugins/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ def run(self, tmp=None, task_vars=None):
command = self._task.args['command']
parser = self._task.args.get('parser')
engine = self._task.args.get('engine', 'command_parser')
key_name = self._task.args.get('key_name')
except KeyError as exc:
raise AnsibleError(to_text(exc))

Expand Down Expand Up @@ -130,7 +131,8 @@ def run(self, tmp=None, task_vars=None):
new_task = self._task.copy()
new_task.args = {
'file': parser,
'content': (json_data or output)
'content': (json_data or output),
'name': key_name,
}

kwargs = {
Expand Down

0 comments on commit 0d2cff2

Please sign in to comment.