mirror of
https://github.com/ansible/awx.git
synced 2026-04-05 01:59:25 -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:
@@ -25,6 +25,39 @@
|
||||
- assert:
|
||||
that: "result is changed"
|
||||
|
||||
- name: "Create a new organization with exists"
|
||||
organization:
|
||||
name: "{{ org_name }}"
|
||||
galaxy_credentials:
|
||||
- Ansible Galaxy
|
||||
state: exists
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that: "result is not changed"
|
||||
|
||||
- name: "Delete a new organization"
|
||||
organization:
|
||||
name: "{{ org_name }}"
|
||||
galaxy_credentials:
|
||||
- Ansible Galaxy
|
||||
state: absent
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that: "result is changed"
|
||||
|
||||
- name: "Create a new organization with exists"
|
||||
organization:
|
||||
name: "{{ org_name }}"
|
||||
galaxy_credentials:
|
||||
- Ansible Galaxy
|
||||
state: exists
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that: "result is changed"
|
||||
|
||||
- name: "Make sure making the same org is not a change"
|
||||
organization:
|
||||
name: "{{ org_name }}"
|
||||
|
||||
Reference in New Issue
Block a user