Change cred_input_src to remove src_cred as primarykey

Signed-off-by: Tom Page <tpage@redhat.com>
This commit is contained in:
Tom Page
2020-06-16 13:56:49 +01:00
parent 4c55685656
commit 1c78190385
4 changed files with 123 additions and 19 deletions

View File

@@ -521,6 +521,9 @@ class TowerModule(AnsibleModule):
elif item_type == 'o_auth2_access_token':
# An oauth2 token has no name, instead we will use its id for any of the messages
item_name = existing_item['id']
elif item_type == 'credential_input_source':
# An credential_input_source has no name, instead we will use its id for any of the messages
item_name = existing_item['id']
else:
self.fail_json(msg="Unable to process delete of {0} due to missing name".format(item_type))
@@ -691,6 +694,8 @@ class TowerModule(AnsibleModule):
item_name = existing_item['username']
elif item_type == 'workflow_job_template_node':
item_name = existing_item['identifier']
elif item_type == 'credential_input_source':
item_name = existing_item['id']
else:
item_name = existing_item['name']
item_id = existing_item['id']