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

for windows servers some columns are blank #193

Open
fmontaldo opened this issue Mar 14, 2019 · 8 comments
Open

for windows servers some columns are blank #193

fmontaldo opened this issue Mar 14, 2019 · 8 comments
Labels
bug needs feedback Requires more feedback from the reporter

Comments

@fmontaldo
Copy link

Hi,

This tool is amazing. I got some windows servers in my ansible inventory. When I check the html report the follwing columns are in black:

Disk Usage
PhysDisk size

Also the Virt column show me this:

?/?

There is a way to fix it.

Thanks in advance

Federico

@fboender
Copy link
Owner

Hi Federico!

I'm not sure if ansible collects the required facts for those columns on windows. I currently don't have access to any Windows hosts with Ansible. Can you send me an example output of the facts for windows (out/some.windows.host) at [email protected] so I can have a look at whether it has the necessary information?

@fboender fboender added bug needs feedback Requires more feedback from the reporter labels Mar 15, 2019
@fmontaldo
Copy link
Author

thansks for your replly I just sent you an email

@fmontaldo
Copy link
Author

Hi Ferry,

Please let me know if you have an update on thins. I got a playbook example that extracts some data.

Thanks in advance

Federico

@orlovds
Copy link

orlovds commented May 16, 2019

@systemfifteen
Copy link

systemfifteen commented Aug 1, 2019

Hi, I have almost exclusive windows environment and also would like to have filled all columns in output. I created small powershell script which is readable by ansible

disk_info.ps1.txt

it is visible in this snippet:


"ansible_disk_info": {
"Capacity": "50.00",
"DeviceID": "C:",
"DriveType": 3,
"FreeSpaceGB": "30.35",
"VolumeName": ""},

I attached whole generated file from windows machine

windows-host.json.txt

is it possible to add support for win machines into cmdb?

Thanks & Best Regards
Peter

@fboender
Copy link
Owner

fboender commented Aug 1, 2019

Hi systemfifteen,

The windows-host.json.txt doesn't look like valid JSON. A few values are not quoted. For example

"ansible_domain": domain.com,

If you can manage to fix those problems, I believe you should be able to use these files with ansible-cmdb fairly straight forward. Normally you'd run ansible -m setup --tree out/ all and you'd get a directory of files that look almost the same as your windows-host.json.txt. So if you just manage to get those files in similar directory, where each file is named like the host it belongs too, it should work. Sometime like:

out/
  win01.mydomain.com

Where win01.mydomain.com has the contents of the windows-host.json.txt file. If you then run ansible-cmdb like this:

ansible-cmdb -i hosts out/ > overview.html

It should work. You may not have all the facts, but you can tweak your input script, the colums or a complete template to customize your output.

@systemfifteen
Copy link

Hi,

sorry, those unquoted values was my effort for anonymization of file :-)

in fact I was able to create html (or any other) report from that file. My only problem is that, for linux machines I can see disk usage with no problem, but for windows servers it is not showing anything.

Through collection I used "-a fact_path='C:\ansible_facts'" with that one line powershell so it produced earlier mentioned snippet along with all other gathered data. it only seems that ansible-cmdb can't interpret said snippet as it does not know how.

so resolution to window machines is simulating ansible disk output similar to linux machines

anyway thanks for reply 👍 I have hint how to proceed
Best Regards
Peter

@FlorianHeigl
Copy link

ran into the same thing today, but i don't fully understand. @systemfifteen could you post here if you manage to get the disk sizes? I remember from long ago one could include facter... no idea if that is still possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug needs feedback Requires more feedback from the reporter
Projects
None yet
Development

No branches or pull requests

5 participants