Project

General

Profile

Actions

Bug #22423

closed

Facts parsing does not recognize Windows operatingssystems

Added by Dirk Götz almost 7 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

When hosts are created during upload of facts or report from ansible, Linux operatingsystems are properly matched, so Operatingsystem is created and assigned to the host. For Windows this fails, so no Operatingsystem is created and assigned to the host. As far as I remember this works for Puppet, but I have no environment to proof this at the moment.

Also no other values like IP address, Domain or Archtitecture are displayed on the windows systems in the host detail view.

The facts I get from the setup module:

S001W7086 | SUCCESS => {
    "ansible_facts": {
        "ansible_architecture": "32-Bit",
        "ansible_bios_date": "04.16.2013",
        "ansible_bios_version": "2.04",
        "ansible_date_time": {
            "date": "2018-01-25",
            "day": "25",
            "epoch": "1516894802,65761",
            "hour": "15",
            "iso8601": "2018-01-25T14:40:02Z",
            "iso8601_basic": "20180125T154002642013",
            "iso8601_basic_short": "20180125T154002",
            "iso8601_micro": "2018-01-25T14:40:02.642013Z",
            "minute": "40",
            "month": "01",
            "second": "02",
            "time": "15:40:02",
            "tz": "W. Europe Standard Time",
            "tz_offset": "+01:00",
            "weekday": "Thursday",
            "weekday_number": "4",
            "weeknumber": "3",
            "year": "2018" 
        },
        "ansible_distribution": "Microsoft Windows 7 Enterprise ",
        "ansible_distribution_major_version": "6",
        "ansible_distribution_version": "6.1.7601.65536",
        "ansible_domain": "example-com",
        "ansible_env": {
            "ALLUSERSPROFILE": "C:\\ProgramData",
            "APPDATA": "C:\\Users\\ansible\\AppData\\Roaming",
            "COMPUTERNAME": "S001W7086",
            "ComSpec": "C:\\WINDOWS\\system32\\cmd.exe",
            "CommonProgramFiles": "C:\\Program Files\\Common Files",
            "FP_NO_HOST_CHECK": "NO",
            "LOCALAPPDATA": "C:\\Users\\ansible\\AppData\\Local",
            "NUMBER_OF_PROCESSORS": "4",
            "OS": "Windows_NT",
            "PATHEXT": ".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.CPL",
            "PROCESSOR_ARCHITECTURE": "x86",
            "PROCESSOR_IDENTIFIER": "x86 Family 6 Model 58 Stepping 9, GenuineIntel",
            "PROCESSOR_LEVEL": "6",
            "PROCESSOR_REVISION": "3a09",
            "PROMPT": "$P$G",
            "PSExecutionPolicyPreference": "Unrestricted",
            "PSModulePath": "C:\\Users\\ansible\\Documents\\WindowsPowerShell\\Modules;C:\\WINDOWS\\system32\\WindowsPowerShell\\v1.0\\Modules\\;c:\\Program Files\\Microsoft Security Client\\MpProvider",
            "PUBLIC": "C:\\Users\\Public",
            "Path": "C:\\ProgramData\\Oracle\\Java\\javapath;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files\\Enterprise Vault\\EVClient\\;C:\\oracle\\product\\11.2.0\\client_1\\bin;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0",
            "ProgramData": "C:\\ProgramData",
            "ProgramFiles": "C:\\Program Files",
            "SystemDrive": "C:",
            "SystemRoot": "C:\\WINDOWS",
            "TEMP": "C:\\Users\\ansible\\AppData\\Local\\Temp",
            "TMP": "C:\\Users\\ansible\\AppData\\Local\\Temp",
            "UATDATA": "C:\\WINDOWS\\CCM\\UATData\\D9F8C395-CAB8-491d-B8AC-179A1FE1BE77",
            "USERDOMAIN": "S001W7086",
            "USERNAME": "ansible",
            "USERPROFILE": "C:\\Users\\ansible",
            "windir": "C:\\WINDOWS",
            "windows_tracing_flags": "3",
            "windows_tracing_logfile": "C:\\BVTBin\\Tests\\installpackage\\csilogfile.log" 
        },
        "ansible_fqdn": "S001W7086.example.com",
        "ansible_hostname": "S001W7086",
        "ansible_interfaces": [
            {
                "default_gateway": "192.168.1.1",
                "dns_domain": null,
                "interface_index": 11,
                "interface_name": "Realtek PCIe GBE Family Controller",
                "macaddress": "80:EE:73:95:8F:58" 
            }
        ],
        "ansible_ip_addresses": [
            "192.168.1.86" 
        ],
        "ansible_kernel": "6.1.7601.65536",
        "ansible_lastboot": "2018-01-25 14:07:14Z",
        "ansible_machine_id": "S-1-5-21-3150559633-1862382374-4241198764",
        "ansible_memtotal_mb": 3491,
        "ansible_nodename": "S001W7086.example.com",
        "ansible_os_family": "Windows",
        "ansible_os_name": "Microsoft Windows 7 Enterprise",
        "ansible_owner_contact": "",
        "ansible_owner_name": "IT-Abteilung",
        "ansible_powershell_version": 3,
        "ansible_processor": [
            "GenuineIntel",
            "Intel(R) Core(TM) i5-3470T CPU @ 2.90GHz",
            "GenuineIntel",
            "Intel(R) Core(TM) i5-3470T CPU @ 2.90GHz",
            "GenuineIntel",
            "Intel(R) Core(TM) i5-3470T CPU @ 2.90GHz",
            "GenuineIntel",
            "Intel(R) Core(TM) i5-3470T CPU @ 2.90GHz" 
        ],
        "ansible_processor_cores": 2,
        "ansible_processor_count": 1,
        "ansible_processor_threads_per_core": 2,
        "ansible_processor_vcpus": 4,
        "ansible_product_name": "DS61",
        "ansible_product_serial": "To be filled by O.E.M.",
        "ansible_reboot_pending": false,
        "ansible_swaptotal_mb": 0,
        "ansible_system": "Win32NT",
        "ansible_system_description": "",
        "ansible_system_vendor": "Shuttle Inc.",
        "ansible_uptime_seconds": 5569,
        "ansible_user_dir": "C:\\Users\\ansible",
        "ansible_user_gecos": "",
        "ansible_user_id": "ansible",
        "ansible_user_sid": "S-1-5-21-3150559633-1862382374-4241198764-1002",
        "ansible_win_rm_certificate_expires": "2021-01-23 15:08:48",
        "ansible_windows_domain": "example.com",
        "module_setup": true
    },
    "changed": false
}
win-aimvdthga4j | SUCCESS => {
    "ansible_facts": {
        "ansible_architecture": "64-Bit",
        "ansible_bios_date": "04.01.2014",
        "ansible_bios_version": "1.10.2-1",
        "ansible_date_time": {
            "date": "2018-01-25",
            "day": "25",
            "epoch": "1516894738,77503",
            "hour": "15",
            "iso8601": "2018-01-25T14:38:58Z",
            "iso8601_basic": "20180125T153858743823",
            "iso8601_basic_short": "20180125T153858",
            "iso8601_micro": "2018-01-25T14:38:58.743823Z",
            "minute": "38",
            "month": "01",
            "second": "58",
            "time": "15:38:58",
            "tz": "W. Europe Standard Time",
            "tz_offset": "+01:00",
            "weekday": "Thursday",
            "weekday_number": "4",
            "weeknumber": "3",
            "year": "2018" 
        },
        "ansible_distribution": "Microsoft Windows Server 2016 Standard",
        "ansible_distribution_major_version": "10",
        "ansible_distribution_version": "10.0.14393.0",
        "ansible_domain": "",
        "ansible_env": {
            "ALLUSERSPROFILE": "C:\\ProgramData",
            "APPDATA": "C:\\Users\\ansible\\AppData\\Roaming",
            "COMPUTERNAME": "WIN-AIMVDTHGA4J",
            "ComSpec": "C:\\Windows\\system32\\cmd.exe",
            "CommonProgramFiles": "C:\\Program Files\\Common Files",
            "CommonProgramFiles(x86)": "C:\\Program Files (x86)\\Common Files",
            "CommonProgramW6432": "C:\\Program Files\\Common Files",
            "LOCALAPPDATA": "C:\\Users\\ansible\\AppData\\Local",
            "NUMBER_OF_PROCESSORS": "2",
            "OS": "Windows_NT",
            "PATHEXT": ".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.CPL",
            "PROCESSOR_ARCHITECTURE": "AMD64",
            "PROCESSOR_IDENTIFIER": "AMD64 Family 15 Model 6 Stepping 1, AuthenticAMD",
            "PROCESSOR_LEVEL": "15",
            "PROCESSOR_REVISION": "0601",
            "PROMPT": "$P$G",
            "PSExecutionPolicyPreference": "Unrestricted",
            "PSModulePath": "C:\\Users\\ansible\\Documents\\WindowsPowerShell\\Modules;C:\\Program Files\\WindowsPowerShell\\Modules;C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\Modules",
            "PUBLIC": "C:\\Users\\Public",
            "Path": "C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Users\\ansible\\AppData\\Local\\Microsoft\\WindowsApps",
            "ProgramData": "C:\\ProgramData",
            "ProgramFiles": "C:\\Program Files",
            "ProgramFiles(x86)": "C:\\Program Files (x86)",
            "ProgramW6432": "C:\\Program Files",
            "SystemDrive": "C:",
            "SystemRoot": "C:\\Windows",
            "TEMP": "C:\\Users\\ansible\\AppData\\Local\\Temp",
            "TMP": "C:\\Users\\ansible\\AppData\\Local\\Temp",
            "USERDOMAIN": "WIN-AIMVDTHGA4J",
            "USERNAME": "ansible",
            "USERPROFILE": "C:\\Users\\ansible",
            "windir": "C:\\Windows" 
        },
        "ansible_fqdn": "WIN-AIMVDTHGA4J.",
        "ansible_hostname": "WIN-AIMVDTHGA4J",
        "ansible_interfaces": [
            {
                "default_gateway": "192.168.0.1",
                "dns_domain": null,
                "interface_index": 3,
                "interface_name": "Red Hat VirtIO Ethernet Adapter",
                "macaddress": "52:54:00:48:EA:26" 
            }
        ],
        "ansible_ip_addresses": [
            "192.168.0.218",
            "fe80::dcab:33d2:4164:e709" 
        ],
        "ansible_kernel": "10.0.14393.0",
        "ansible_lastboot": "2018-01-25 13:53:32Z",
        "ansible_machine_id": "S-1-5-21-3688873318-4234183837-3746228194",
        "ansible_memtotal_mb": 4095,
        "ansible_nodename": "WIN-AIMVDTHGA4J.",
        "ansible_os_family": "Windows",
        "ansible_os_name": "Microsoft Windows Server 2016 Standard",
        "ansible_owner_contact": "",
        "ansible_owner_name": "Windows-Benutzer",
        "ansible_powershell_version": 5,
        "ansible_processor": [],
        "ansible_processor_cores": 1,
        "ansible_processor_count": 2,
        "ansible_processor_threads_per_core": 0.5,
        "ansible_processor_vcpus": 0.5,
        "ansible_product_name": "Standard PC (i440FX + PIIX, 1996)",
        "ansible_product_serial": null,
        "ansible_reboot_pending": false,
        "ansible_swaptotal_mb": 0,
        "ansible_system": "Win32NT",
        "ansible_system_description": "",
        "ansible_system_vendor": "QEMU",
        "ansible_uptime_seconds": 6328,
        "ansible_user_dir": "C:\\Users\\ansible",
        "ansible_user_gecos": "",
        "ansible_user_id": "ansible",
        "ansible_user_sid": "S-1-5-21-3688873318-4234183837-3746228194-1001",
        "ansible_win_rm_certificate_expires": "2021-01-23 15:07:49",
        "ansible_windows_domain": "WORKGROUP",
        "module_setup": true
    },
    "changed": false
}

Actions #1

Updated by Daniel Lobato Garcia over 6 years ago

Link to GH comment who provides some insights about what's going on too - https://github.com/theforeman/foreman_ansible/pull/174#issuecomment-396836682

Actions #2

Updated by The Foreman Bot over 6 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Daniel Lobato Garcia
  • Pull request https://github.com/theforeman/foreman_ansible/pull/178 added
Actions #3

Updated by Marek Hulán over 6 years ago

  • Translation missing: en.field_release set to 361
Actions #4

Updated by Anonymous over 6 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF