You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I have the same issue. It's probably related to the fact, that the ansible-cmdb expects the variables with names like ansible_distribution...
I (as a really bad python programmerr) also used the facts file from either the setup-module or an ansible plabyook where the ansible -m setup produces vars like above and the playbook / setup doesn't.
Here is my (most likely not nice) python code:
with open(myfile, encoding="utf-8") as json_file:
my_basename = os.path.basename(myfile)
counter[my_tab_name] += 1
data = json.load(json_file)
# if facts where gethered by ansible -m setup. then all
# facts will be prefixed
# by ansible_ and the dict starts with ansible_facts
if data.get('ansible_facts'):
facts = data.get('ansible_facts')
prefix = 'ansible_'
else:
facts = data
prefix = ''
Perhaps we can encourage one of the developers, to includes someting like this in the code
Ansible Tower Generated Json Output unable to generate report. I tried to generate report by genrate all facts gathered via ansible tower and placed
hosts: all
vars:
ansible_python_interpreter: "/usr/bin/python"
tasks:
copy:
content: "{{ ansible_facts }}"
dest: "{{ ansible_fqdn }}"
Tried generate Report as below
ansible-cmdb af/ > new-overview.html
Reports are not generated as expected. Any workaround for this ?
The text was updated successfully, but these errors were encountered: