Skip to content

Commit

Permalink
Merge pull request #12031 from fosterseth/awxkit_import_more_verbose_…
Browse files Browse the repository at this point in the history
…error

awxkit log which resource failed to import
  • Loading branch information
fosterseth committed Apr 19, 2022
2 parents ae7960e + 1462af6 commit c931551
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion awx_collection/plugins/modules/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
- name: Export a job template named "My Template" and all Credentials
export:
job_template: "My Template"
job_templates: "My Template"
credential: 'all'
'''

Expand Down
3 changes: 2 additions & 1 deletion awxkit/awxkit/api/pages/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,8 @@ def _import_list(self, endpoint, assets):
_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

Expand Down

0 comments on commit c931551

Please sign in to comment.