mirror of
https://github.com/ansible/awx.git
synced 2026-05-17 06:17:36 -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:
@@ -34,6 +34,39 @@
|
||||
that:
|
||||
- "result is changed"
|
||||
|
||||
- name: Create a team with exists
|
||||
team:
|
||||
name: "{{ team_name }}"
|
||||
organization: Default
|
||||
state: exists
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "result is not changed"
|
||||
|
||||
- name: Delete a team
|
||||
team:
|
||||
name: "{{ team_name }}"
|
||||
organization: Default
|
||||
state: absent
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "result is changed"
|
||||
|
||||
- name: Create a team with exists
|
||||
team:
|
||||
name: "{{ team_name }}"
|
||||
organization: Default
|
||||
state: exists
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "result is changed"
|
||||
|
||||
- name: Delete a team
|
||||
team:
|
||||
name: "{{ team_name }}"
|
||||
|
||||
Reference in New Issue
Block a user