PR to fix the IOS_NTP integration TC failure (#57481)
* ios_ntp tc fail Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com> * ios_ntp tc fail Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com> * fix for local connection Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
This commit is contained in:
parent
91d326cb68
commit
04bfcd08a8
1 changed files with 24 additions and 0 deletions
|
@ -1,4 +1,6 @@
|
||||||
---
|
---
|
||||||
|
- debug: msg="START connection={{ ansible_connection }} ios_ntp sanity test"
|
||||||
|
|
||||||
- name: remove NTP (if set)
|
- name: remove NTP (if set)
|
||||||
ios_ntp: &remove
|
ios_ntp: &remove
|
||||||
server: 10.75.32.5
|
server: 10.75.32.5
|
||||||
|
@ -9,6 +11,7 @@
|
||||||
auth_key: 15435A030726242723273C21181319000A
|
auth_key: 15435A030726242723273C21181319000A
|
||||||
auth: true
|
auth: true
|
||||||
state: absent
|
state: absent
|
||||||
|
provider: "{{ cli }}"
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
|
@ -18,6 +21,7 @@
|
||||||
server: 10.75.32.5
|
server: 10.75.32.5
|
||||||
source_int: "{{ test_interface }}"
|
source_int: "{{ test_interface }}"
|
||||||
state: present
|
state: present
|
||||||
|
provider: "{{ cli }}"
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert: &true
|
- assert: &true
|
||||||
|
@ -32,11 +36,22 @@
|
||||||
that:
|
that:
|
||||||
- "result.changed == false"
|
- "result.changed == false"
|
||||||
|
|
||||||
|
- name: load acl NTP_ACL into device
|
||||||
|
ios_config:
|
||||||
|
lines:
|
||||||
|
- 10 permit ip host 192.0.2.1 any log
|
||||||
|
parents: ip access-list extended NTP_ACL
|
||||||
|
provider: "{{ cli }}"
|
||||||
|
register: result
|
||||||
|
|
||||||
|
- assert: *true
|
||||||
|
|
||||||
- name: configure NTP
|
- name: configure NTP
|
||||||
ios_ntp: &config1
|
ios_ntp: &config1
|
||||||
acl: NTP_ACL
|
acl: NTP_ACL
|
||||||
logging: true
|
logging: true
|
||||||
state: present
|
state: present
|
||||||
|
provider: "{{ cli }}"
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert: *true
|
- assert: *true
|
||||||
|
@ -53,6 +68,7 @@
|
||||||
auth_key: 15435A030726242723273C21181319000A
|
auth_key: 15435A030726242723273C21181319000A
|
||||||
auth: true
|
auth: true
|
||||||
state: present
|
state: present
|
||||||
|
provider: "{{ cli }}"
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert: *true
|
- assert: *true
|
||||||
|
@ -68,6 +84,7 @@
|
||||||
acl: NTP_ACL
|
acl: NTP_ACL
|
||||||
logging: true
|
logging: true
|
||||||
state: absent
|
state: absent
|
||||||
|
provider: "{{ cli }}"
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
- assert: *true
|
- assert: *true
|
||||||
|
@ -81,3 +98,10 @@
|
||||||
always:
|
always:
|
||||||
- name: Remove ntp config
|
- name: Remove ntp config
|
||||||
ios_ntp: *remove
|
ios_ntp: *remove
|
||||||
|
|
||||||
|
- name: remove NTP_ACL from device
|
||||||
|
ios_config:
|
||||||
|
lines:
|
||||||
|
- no ip access-list extended NTP_ACL
|
||||||
|
provider: "{{ cli }}"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue