mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
Changed when condition from checking image version to checking keys being (#45943)
defined
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
- result.stdout[0]['TABLE_listen_on_port']['ROW_listen_on_port'].l_port
|
||||
- result.stdout[0]['TABLE_listen_on_port']['ROW_listen_on_port'].l_port|string is search("80")
|
||||
- result.stdout[0]['operation_status'].o_status == 'nxapi enabled'
|
||||
when: major_version is version('9.2', '<')
|
||||
when: result.stdout[0].TABLE_listen_on_port is defined
|
||||
|
||||
- name: Assert HTTP configuration changes 9.2 or greater
|
||||
assert:
|
||||
@@ -13,4 +13,4 @@
|
||||
- result.stdout[0]['http_port']
|
||||
- result.stdout[0]['http_port']|string is search("80")
|
||||
- result.stdout[0]['nxapi_status'] == 'nxapi enabled'
|
||||
when: major_version is version('9.2', '>=')
|
||||
when: result.stdout[0].http_port is defined
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
- result.stdout[0]['TABLE_listen_on_port']['ROW_listen_on_port'].l_port
|
||||
- result.stdout[0]['TABLE_listen_on_port']['ROW_listen_on_port'].l_port|string is search("9443")
|
||||
- result.stdout[0]['operation_status'].o_status == 'nxapi enabled'
|
||||
when: major_version is version('9.2', '<')
|
||||
when: result.stdout[0].TABLE_listen_on_port is defined
|
||||
|
||||
- name: Assert HTTPS configuration changes 9.2 or greater
|
||||
assert:
|
||||
@@ -13,4 +13,4 @@
|
||||
- result.stdout[0]['https_port']
|
||||
- result.stdout[0]['https_port']|string is search("9443")
|
||||
- result.stdout[0]['nxapi_status'] == 'nxapi enabled'
|
||||
when: major_version is version('9.2', '>=')
|
||||
when: result.stdout[0].https_port is defined
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
- result.stdout[0]['TABLE_listen_on_port']['ROW_listen_on_port'][0].l_port
|
||||
- result.stdout[0]['TABLE_listen_on_port']['ROW_listen_on_port'][0].l_port|string is search("80")
|
||||
- result.stdout[0]['operation_status'].o_status == 'nxapi enabled'
|
||||
when: major_version is version('9.2', '<')
|
||||
when: result.stdout[0].TABLE_listen_on_port is defined
|
||||
|
||||
- name: Assert HTTPS & HTTP configuration changes 9.2 or greater
|
||||
assert:
|
||||
@@ -17,4 +17,4 @@
|
||||
- result.stdout[0]['http_port']
|
||||
- result.stdout[0]['http_port']|string is search("80")
|
||||
- result.stdout[0]['nxapi_status'] == 'nxapi enabled'
|
||||
when: major_version is version('9.2', '>=')
|
||||
when: result.stdout[0].https_port is defined or result.stdout[0].http_port is defined
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
- result.stdout[0]['TABLE_listen_on_port']['ROW_listen_on_port'][0].l_port
|
||||
- result.stdout[0]['TABLE_listen_on_port']['ROW_listen_on_port'][0].l_port|string is search("99")
|
||||
- result.stdout[0]['operation_status'].o_status == 'nxapi enabled'
|
||||
when: major_version is version('9.2', '<')
|
||||
when: result.stdout[0].TABLE_listen_on_port is defined
|
||||
|
||||
- name: Assert HTTPS & HTTP configuration changes 9.2 or greater
|
||||
assert:
|
||||
@@ -17,4 +17,4 @@
|
||||
- result.stdout[0]['http_port']
|
||||
- result.stdout[0]['http_port']|string is search("99")
|
||||
- result.stdout[0]['nxapi_status'] == 'nxapi enabled'
|
||||
when: major_version is version('9.2', '>=')
|
||||
when: result.stdout[0].https_port is defined or result.stdout[0].http_port is defined
|
||||
|
||||
Reference in New Issue
Block a user