-
Notifications
You must be signed in to change notification settings - Fork 0
/
frr_native1.yml
38 lines (34 loc) · 969 Bytes
/
frr_native1.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Test cnx sur FRR
- hosts: all
gather_facts: false
#connection: ansible.netcommon.network_cli
tasks:
- name: telnet init
telnet:
timeout: 3
user:
login_prompt: "Password: "
password_prompt: "Password: "
password: password
port: '{{ ansible_port }}'
prompts:
- "> "
commands:
- show interface
register: previous_command
#- name: Run command and parse with native
# ansible.utils.cli_parse:
# command: "show interface"
# parser:
# name: ansible.netcommon.native
# set_fact: interfaces_fact
- name: Pass text and template_path
ansible.utils.cli_parse:
text: "{{ previous_command['stdout'] }}"
parser:
name: ansible.netcommon.native
template_path: "templates/frr_show_interface.yml"
set_fact: native_interface
- name: Show result
debug:
var: hostvars