awxkit log which resource failed to import

This commit is contained in:
Seth Foster 2022-04-11 17:03:13 -04:00
parent ac8204427e
commit 1462af61b0
No known key found for this signature in database
GPG Key ID: 86E90D96F7184028
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