mirror of
https://github.com/ansible/awx.git
synced 2026-05-19 14:57:39 -02:30
Hack to delete orphaned organizations, consolidate get_one methods
minor test update Updating the message if more than one object is found Update test to new message
This commit is contained in:
@@ -3,6 +3,18 @@
|
||||
tower_organization:
|
||||
name: Default
|
||||
|
||||
- name: HACK - delete orphaned projects from preload data where organization deletd
|
||||
tower_project:
|
||||
name: "{{ item['id'] }}"
|
||||
scm_type: git
|
||||
state: absent
|
||||
loop: >
|
||||
{{ query('awx.awx.tower_api', 'projects',
|
||||
query_params={'organization__isnull': true, 'name': 'Demo Project'})
|
||||
}}
|
||||
loop_control:
|
||||
label: "Deleting Demo Project with null organization id={{ item['id'] }}"
|
||||
|
||||
- name: Assure that demo project exists
|
||||
tower_project:
|
||||
name: "Demo Project"
|
||||
|
||||
Reference in New Issue
Block a user