mirror of
https://github.com/ansible/awx.git
synced 2026-03-09 21:49:27 -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:
@@ -38,6 +38,42 @@
|
||||
that:
|
||||
- "result is changed"
|
||||
|
||||
- name: Create an Instance Group with exists
|
||||
instance_group:
|
||||
name: "{{ group_name1 }}"
|
||||
policy_instance_percentage: 34
|
||||
policy_instance_minimum: 12
|
||||
state: exists
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "result is not changed"
|
||||
|
||||
- name: Delete an Instance Group
|
||||
instance_group:
|
||||
name: "{{ group_name1 }}"
|
||||
policy_instance_percentage: 34
|
||||
policy_instance_minimum: 12
|
||||
state: absent
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "result is changed"
|
||||
|
||||
- name: Create an Instance Group with exists
|
||||
instance_group:
|
||||
name: "{{ group_name1 }}"
|
||||
policy_instance_percentage: 34
|
||||
policy_instance_minimum: 12
|
||||
state: exists
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "result is changed"
|
||||
|
||||
- name: Update an Instance Group
|
||||
instance_group:
|
||||
name: "{{ result.id }}"
|
||||
|
||||
Reference in New Issue
Block a user