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:
Alan Rominger
2020-09-09 14:10:51 -04:00
parent ff7c2e9180
commit a73323f3d6
7 changed files with 107 additions and 86 deletions

View File

@@ -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"