mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-22 20:13:59 -07:00
Ensure exit_json returns failed = False
This is required for modules that may return a non-zero `rc` value for a successful run, similar to #24865 for Windows fixing **win_chocolatey**. We also disable the dependency on `rc` value only, even if `failed` was set. Adapted unit and integration tests to the new scheme. Updated raw, shell, script, expect to take `rc` into account.
This commit is contained in:
parent
1f78715848
commit
0e160d5c7e
17 changed files with 68 additions and 56 deletions
|
@ -111,7 +111,6 @@
|
|||
- name: assert new EIP was assigned
|
||||
assert:
|
||||
that:
|
||||
- '"failed" not in result'
|
||||
- '"public_ip" in result'
|
||||
|
||||
|
||||
|
@ -128,10 +127,6 @@
|
|||
instance_id={{ instance_id }}
|
||||
register: result
|
||||
|
||||
- name: assert success disassociate EIP associated with instance
|
||||
assert:
|
||||
that:
|
||||
- '"failed" not in result'
|
||||
|
||||
# eip allocated:1 assigned:0
|
||||
|
||||
|
@ -152,7 +147,6 @@
|
|||
- name: assert new EIP was assigned
|
||||
assert:
|
||||
that:
|
||||
- '"failed" not in result'
|
||||
- '"public_ip" in result'
|
||||
|
||||
|
||||
|
@ -176,11 +170,6 @@
|
|||
ec2_secret_key={{ ec2_secret_key }}
|
||||
register: result
|
||||
|
||||
- name: assert EIP deactivated
|
||||
assert:
|
||||
that:
|
||||
- '"failed" not in result'
|
||||
|
||||
|
||||
# eip allocated:0 assigned:0
|
||||
|
||||
|
@ -205,7 +194,6 @@
|
|||
- name: assert provision EIP with instance_id
|
||||
assert:
|
||||
that:
|
||||
- '"failed" not in result'
|
||||
- '"public_ip" in result'
|
||||
|
||||
|
||||
|
@ -245,7 +233,6 @@
|
|||
- name: assert VPC EIP creation
|
||||
assert:
|
||||
that:
|
||||
- '"failed" not in result'
|
||||
- '"public_ip" in result'
|
||||
|
||||
|
||||
|
@ -268,7 +255,6 @@
|
|||
#- name: assert new VPC EIP was assigned
|
||||
# assert:
|
||||
# that:
|
||||
# - '"failed" not in result'
|
||||
# - '"public_ip" in result'
|
||||
#
|
||||
#
|
||||
|
@ -307,7 +293,6 @@
|
|||
- name: assert environment variable EC2_REGION
|
||||
assert:
|
||||
that:
|
||||
- '"failed" not in result'
|
||||
- '"public_ip" in result'
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue