mirror of
https://github.com/ansible/awx.git
synced 2026-05-15 21:37:42 -02:30
Make state exists universal in collection (#13890)
Make state: exists available for all API modules Make state:exists return the ID just like it would if it created the resource
This commit is contained in:
@@ -13,6 +13,22 @@
|
||||
name: "{{ label_name }}"
|
||||
organization: Default
|
||||
state: present
|
||||
register: results
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "results is changed"
|
||||
|
||||
- name: Create a Label with exists
|
||||
label:
|
||||
name: "{{ label_name }}"
|
||||
organization: Default
|
||||
state: exists
|
||||
register: results
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "results is not changed"
|
||||
|
||||
- name: Check module fails with correct msg
|
||||
label:
|
||||
|
||||
Reference in New Issue
Block a user