|
|
@ -12,7 +12,7 @@
|
|
|
|
- name: Change port
|
|
|
|
- name: Change port
|
|
|
|
junos_netconf:
|
|
|
|
junos_netconf:
|
|
|
|
state: present
|
|
|
|
state: present
|
|
|
|
netconf_port: 22
|
|
|
|
netconf_port: 8080
|
|
|
|
register: result
|
|
|
|
register: result
|
|
|
|
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
- assert:
|
|
|
@ -22,23 +22,19 @@
|
|
|
|
- name: idempotent tests
|
|
|
|
- name: idempotent tests
|
|
|
|
junos_netconf:
|
|
|
|
junos_netconf:
|
|
|
|
state: present
|
|
|
|
state: present
|
|
|
|
netconf_port: 22
|
|
|
|
netconf_port: 8080
|
|
|
|
register: result
|
|
|
|
register: result
|
|
|
|
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
- assert:
|
|
|
|
that:
|
|
|
|
that:
|
|
|
|
- "result.changed == false"
|
|
|
|
- "result.changed == false"
|
|
|
|
|
|
|
|
|
|
|
|
- name: wait for persistent socket to timeout, this ensures new socket creation with connection type netconf
|
|
|
|
- name: Ensure we can communicate over 8080
|
|
|
|
pause:
|
|
|
|
|
|
|
|
seconds: 120
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Ensure we can communicate over 22
|
|
|
|
|
|
|
|
junos_command:
|
|
|
|
junos_command:
|
|
|
|
rpcs:
|
|
|
|
rpcs:
|
|
|
|
- get-software-information
|
|
|
|
- get-software-information
|
|
|
|
provider: "{{ netconf }}"
|
|
|
|
provider: "{{ netconf }}"
|
|
|
|
port: 22
|
|
|
|
port: 8080
|
|
|
|
|
|
|
|
|
|
|
|
# This protects against the port override above not being honoured and a bug setting the port
|
|
|
|
# This protects against the port override above not being honoured and a bug setting the port
|
|
|
|
- name: Ensure we can NOT communicate over default port
|
|
|
|
- name: Ensure we can NOT communicate over default port
|
|
|
@ -53,10 +49,6 @@
|
|
|
|
- "result.failed == true"
|
|
|
|
- "result.failed == true"
|
|
|
|
- "'unable to open shell' in result.msg"
|
|
|
|
- "'unable to open shell' in result.msg"
|
|
|
|
|
|
|
|
|
|
|
|
- name: wait for persistent socket to timeout, this ensures new socket creation with connection type netconf
|
|
|
|
|
|
|
|
pause:
|
|
|
|
|
|
|
|
seconds: 120
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Set back netconf to default port
|
|
|
|
- name: Set back netconf to default port
|
|
|
|
junos_netconf:
|
|
|
|
junos_netconf:
|
|
|
|
state: present
|
|
|
|
state: present
|
|
|
|