Merge pull request #12031 from fosterseth/awxkit_import_more_verbose_error

awxkit log which resource failed to import
This commit is contained in:
Seth Foster 2022-04-19 15:44:37 -04:00 committed by GitHub
commit c93155132a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -92,7 +92,7 @@ EXAMPLES = '''
- name: Export a job template named "My Template" and all Credentials
export:
job_template: "My Template"
job_templates: "My Template"
credential: 'all'
'''

View File

@ -252,7 +252,8 @@ class ApiV2(base.Base):
_page = _page.put(post_data)
changed = True
except (exc.Common, AssertionError) as e:
log.error("Object import failed: %s.", e)
identifier = asset.get("name", None) or asset.get("username", None) or asset.get("hostname", None)
log.error(f"{endpoint} \"{identifier}\": {e}.")
log.debug("post_data: %r", post_data)
continue