
上QQ阅读APP看书,第一时间看更新
How to do it...
- Create a new playbook called pb_jnpr_net_build.yml, as shown in the following code:
$ cat pb_jnpr_net_build.yml
- name: Build Juniper SP Network
hosts: junos
tasks:
- name: "Enable NETCONF"
junos_netconf:
netconf_port: 830
state: present
vars:
Ansible_connection: network_cli
tags: netconf
- Update the group_vars/junos.yml file with the connection details, as shown in the following code:
$ cat group_vars/junos.yml
Ansible_network_os: junos
Ansible_connection: netconf