2017-10-24 05:19:23 +02:00
|
|
|
---
|
2017-12-20 17:26:09 +01:00
|
|
|
- debug: msg="START iosxr_netconf cli/basic.yaml on connection={{ ansible_connection }}"
|
2017-10-24 05:19:23 +02:00
|
|
|
|
|
|
|
- name: Disable NetConf service
|
|
|
|
iosxr_netconf: &disable_netconf
|
|
|
|
state: absent
|
|
|
|
|
|
|
|
- block:
|
|
|
|
- name: Enable Netconf service
|
|
|
|
iosxr_netconf:
|
|
|
|
netconf_port: 830
|
|
|
|
netconf_vrf: 'default'
|
|
|
|
state: present
|
|
|
|
register: result
|
|
|
|
|
|
|
|
- assert: &true
|
|
|
|
that:
|
|
|
|
- 'result.changed == true'
|
|
|
|
|
|
|
|
- name: Check idempotence of Enable Netconf service
|
|
|
|
iosxr_netconf:
|
|
|
|
netconf_port: 830
|
|
|
|
netconf_vrf: 'default'
|
|
|
|
state: present
|
|
|
|
register: result
|
|
|
|
|
|
|
|
- assert: &false
|
|
|
|
that:
|
|
|
|
- 'result.changed == false'
|
|
|
|
|
|
|
|
- name: Change Netconf port
|
|
|
|
iosxr_netconf:
|
|
|
|
netconf_port: 9000
|
|
|
|
state: present
|
|
|
|
register: result
|
|
|
|
|
|
|
|
- assert: *true
|
|
|
|
|
|
|
|
- name: Check idempotent of change Netconf port
|
|
|
|
iosxr_netconf:
|
|
|
|
netconf_port: 9000
|
|
|
|
state: present
|
|
|
|
register: result
|
|
|
|
|
|
|
|
- assert: *false
|
|
|
|
|
|
|
|
- name: Add Netconf vrf
|
|
|
|
iosxr_netconf:
|
|
|
|
netconf_port: 9000
|
|
|
|
netconf_vrf: 'new_default'
|
|
|
|
state: present
|
|
|
|
register: result
|
|
|
|
|
|
|
|
- assert: *true
|
|
|
|
|
|
|
|
- name: Check idempotent of add Netconf vrf
|
|
|
|
iosxr_netconf:
|
|
|
|
netconf_port: 9000
|
|
|
|
netconf_vrf: 'new_default'
|
|
|
|
state: present
|
|
|
|
register: result
|
|
|
|
|
|
|
|
- assert: *false
|
|
|
|
|
|
|
|
always:
|
|
|
|
- name: Disable Netconf service
|
|
|
|
iosxr_netconf: *disable_netconf
|
|
|
|
|
2017-12-20 17:26:09 +01:00
|
|
|
- debug: msg="END iosxr_netconf cli/basic.yaml on connection={{ ansible_connection }}"
|