Skip to content

Commit

Permalink
adding name option for textfsm to create facts to key (#202)
Browse files Browse the repository at this point in the history
* adding name option for textfsm to create facts to key

Signed-off-by: jwoogee <jswoods1@gmail.com>

* renamed var to 'name' to match text_fsm naming

Signed-off-by: z003gn3 <jonathon.woods@target.com>
  • Loading branch information
jwoogee authored and trishnaguha committed Dec 3, 2018
1 parent 1414820 commit f457893
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')
name = self._task.args.get('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': name,
}

kwargs = {
Expand Down

0 comments on commit f457893

Please sign in to comment.