Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

awxkit log which resource failed to import #12031

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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