mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
2e76c89910
* Update task definitions for network_cli * Add connection to debug messages * Specify connection for prepare task * pc won't be around for connection=network_cli * Assorted Python 3 fixes * Give default port if ansible_ssh_port missing * delegate -> connection * Extend error regex
69 lines
1.4 KiB
YAML
69 lines
1.4 KiB
YAML
---
|
|
- debug: msg="START iosxr_netconf cli/basic.yaml on connection={{ ansible_connection }}"
|
|
|
|
- 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
|
|
|
|
- debug: msg="END iosxr_netconf cli/basic.yaml on connection={{ ansible_connection }}"
|