Adding Netbox
This commit is contained in:
25
roles/ansible-network.cisco_ios/includes/run_cli.yaml
Normal file
25
roles/ansible-network.cisco_ios/includes/run_cli.yaml
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
- name: run cli command pre hook
|
||||
include_tasks: "{{ ios_run_cli_command_pre_hook }}"
|
||||
when: ios_run_cli_command_pre_hook is defined and ios_run_cli_command_pre_hook
|
||||
|
||||
- name: run command and parse output
|
||||
cli:
|
||||
command: "{{ ios_command }}"
|
||||
parser: "{{ parser }}"
|
||||
engine: "{{ ios_parser_engine | default(None) }}"
|
||||
name: "{{ ios_name | default(None) }} "
|
||||
with_first_found:
|
||||
- files:
|
||||
- "{{ ios_parser }}"
|
||||
paths:
|
||||
- "{{ playbook_dir }}/parser_templates/ios"
|
||||
- "~/.ansible/ansible_network/parser_templates/ios"
|
||||
- "/etc/ansible/ansible_network/parser_templates/ios"
|
||||
- "{{ role_path }}/parser_templates"
|
||||
loop_control:
|
||||
loop_var: parser
|
||||
|
||||
- name: run cli command post hook
|
||||
include_tasks: "{{ ios_run_cli_command_post_hook }}"
|
||||
when: ios_run_cli_command_post_hook is defined and ios_run_cli_command_post_hook
|
||||
Reference in New Issue
Block a user