Hi,

I have installed Puppet 4.7.0 and foreman 1.13 in two Centos 7 machines. 
But, I'm getting two different formats of json response from two different 
machines on request of *api/fact_values* api as mentioned below.
I checked facter command in the puppet agent machines configured with each 
Puppet Server and found the same format (nested json).

Format 1:
=======
"sdin-swt-fvt-11.sdcorp.global.sandisk.com": {
      "chocolateyversion": "0",
      "cpuusage": "1",
      "physicalprocessorcount": "1",
      "kernelmajversion": "10.0",
      "kernelrelease": "10.0.14393",
      "kernelversion": "10.0.14393",
      "operatingsystemmajrelease": "10.0.14393",
      ...
      ...
      "system32": "C:\\WINDOWS\\system32",
      "env_temp_variable": "C:\\WINDOWS\\TEMP",
      "system_uptime": "{\"days\"=>2, \"hours\"=>64, \"seconds\"=>230571, 
\"uptime\"=>\"2 days\"}",
      "networking": "{\"dhcp\"=>\"10.65.168.11\", 
\"domain\"=>\"sdcorp.global.sandisk.com\", 
\"fqdn\"=>\"SDIN-SWT-FVT-11.sdcorp.global.sandisk.com\", 
\"hostname\"=>\"SDIN-SWT-FVT-11\", 
\"interfaces\"=>{\"Ethernet\"=>{\"bindings\"=>[{\"address\"=>\"10.65.168.152\", 
\"netmask\"=>\"255.255.248.0\", \"network\"=>\"10.65.168.0\"}], 
\"bindings6\"=>[{\"address\"=>\"fe80::205d:c6e4:f3df:84e7%2\", 
\"netmask\"=>\"ffff:ffff:ffff:ffff::\", \"network\"=>\"fe80::%2\"}], 
\"dhcp\"=>\"10.65.168.11\", \"ip\"=>\"10.65.168.152\", 
\"ip6\"=>\"fe80::205d:c6e4:f3df:84e7%2\", \"mac\"=>\"F0:79:59:91:13:AD\", 
\"mtu\"=>1500, \"netmask\"=>\"255.255.248.0\", 
\"netmask6\"=>\"ffff:ffff:ffff:ffff::\", \"network\"=>\"10.65.168.0\", 
\"network6\"=>\"fe80::%2\"}}, \"ip\"=>\"10.65.168.152\", 
\"ip6\"=>\"fe80::205d:c6e4:f3df:84e7%2\", \"mac\"=>\"F0:79:59:91:13:AD\", 
\"mtu\"=>1500, \"netmask\"=>\"255.255.248.0\", 
\"netmask6\"=>\"ffff:ffff:ffff:ffff::\", \"network\"=>\"10.65.168.0\", 
\"network6\"=>\"fe80::%2\", \"primary\"=>\"Ethernet\"}",
      "duts": "{\"DUT_0\"=>{\"BytesPerSector\"=>\"512\", 
\"Capabilities\"=>\"{3,4,10}\", \"Caption\"=>\"SanDisk SD8SB8U128G\", 
\"ConfigManagerErrorCode\"=>\"0\", \"ConfigManagerUserConfig\"=>\"FALSE\", 
\"CreationClassName\"=>\"Win32_DiskDrive\", \"Description\"=>\"Disk 
drive\", \"DeviceID\"=>\"\\\\\\\\.\\\\PHYSICALDRIVE0\", 
\"FirmwareRevision\"=>\"X4120000\", \"Index\"=>\"0\", 
\"InterfaceType\"=>\"IDE\", \"Manufacturer\"=>\"(Standard disk drives)\", 
\"MediaLoaded\"=>\"TRUE\", \"MediaType\"=>\"Fixed hard disk media\", 
\"Model\"=>\"SanDisk SD8SB8U128G\", 
\"Name\"=>\"\\\\\\\\.\\\\PHYSICALDRIVE0\", \"Partitions\"=>\"3\", 
\"SCSIBus\"=>\"1\", \"SCSILogicalUnit\"=>\"0\", \"SCSIPort\"=>\"0\", 
\"SCSITargetId\"=>\"0\", \"SectorsPerTrack\"=>\"63\", 
\"SerialNumber\"=>\"154750640136\", \"Size\"=>\"128034708480\", 
\"Status\"=>\"OK\", \"SystemCreationClassName\"=>\"Win32_ComputerSystem\", 
\"SystemName\"=>\"SDIN-SWT-FVT-11\", \"TotalCylinders\"=>\"15566\", 
\"TotalHeads\"=>\"255\", \"TotalSectors\"=>\"250067790\", 
\"TotalTracks\"=>\"3969330\", \"TracksPerCylinder\"=>\"255\"}, 
\"DUT_1\"=>{\"BytesPerSector\"=>\"512\", \"Capabilities\"=>\"{3,4,10}\", 
\"Caption\"=>\"SanDisk SD8TB8U-256G-1006\", 
\"ConfigManagerErrorCode\"=>\"0\", \"ConfigManagerUserConfig\"=>\"FALSE\", 
\"CreationClassName\"=>\"Win32_DiskDrive\", \"Description\"=>\"Disk 
drive\", \"DeviceID\"=>\"\\\\\\\\.\\\\PHYSICALDRIVE1\", 
\"FirmwareRevision\"=>\"A0458DHS\", \"Index\"=>\"1\", 
\"InterfaceType\"=>\"IDE\", \"Manufacturer\"=>\"(Standard disk drives)\", 
\"MediaLoaded\"=>\"TRUE\", \"MediaType\"=>\"Fixed hard disk media\", 
\"Model\"=>\"SanDisk SD8TB8U-256G-1006\", 
\"Name\"=>\"\\\\\\\\.\\\\PHYSICALDRIVE1\", \"Partitions\"=>\"0\", 
\"SCSIBus\"=>\"2\", \"SCSILogicalUnit\"=>\"0\", \"SCSIPort\"=>\"0\", 
\"SCSITargetId\"=>\"0\", \"SectorsPerTrack\"=>\"63\", 
\"SerialNumber\"=>\"154743640111\", \"Signature\"=>\"0\", 
\"Size\"=>\"256052966400\", \"Status\"=>\"OK\", 
\"SystemCreationClassName\"=>\"Win32_ComputerSystem\", 
\"SystemName\"=>\"SDIN-SWT-FVT-11\", \"TotalCylinders\"=>\"31130\", 
\"TotalHeads\"=>\"255\", \"TotalSectors\"=>\"500103450\", 
\"TotalTracks\"=>\"7938150\", \"TracksPerCylinder\"=>\"255\"}, 
\"No_of_Drives\"=>2}",
      "interfaces": "Ethernet",
      "dhcp_servers": "{\"Ethernet\"=>\"10.65.168.11\", 
\"system\"=>\"10.65.168.11\"}",
      "macaddress_Ethernet": "F0:79:59:91:13:AD",
      "macaddress": "F0:79:59:91:13:AD",
      "is_pe": "false",
      "is_virtual": "false",
      "puppet_stringify_facts": "false",
      "clientnoop": "false",
      "network6_Ethernet": "fe80::%2",
      "network6": "fe80::%2",
      "ipaddress6_Ethernet": "fe80::205d:c6e4:f3df:84e7%2",
      "ipaddress6": "fe80::205d:c6e4:f3df:84e7%2",
      "netmask6": "ffff:ffff:ffff:ffff::",
      "netmask6_Ethernet": "ffff:ffff:ffff:ffff::",
      "iis_version": "Get-ItemProperty : Cannot find path 
'HKLM:\\SOFTWARE\\Microsoft\\InetStp\\' because it does not exist.At line:1 
char:2+ (Get-ItemProperty HKLM:\\SOFTWARE\\Microsoft\\InetStp\\ -Name 
VersionStri ...+ 
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    + 
CategoryInfo          : ObjectNotFound: (HKLM:\\SOFTWARE\\Microsoft\\InetSt 
   p\\:String) [Get-ItemProperty], ItemNotFoundException    + 
FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetIt   
 emPropertyCommand You cannot call a method on a null-valued expression.At 
line:1 char:1+ (Get-ItemProperty HKLM:\\SOFTWARE\\Microsoft\\InetStp\\ 
-Name VersionStri ...+ 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    + 
CategoryInfo          : InvalidOperation: (:) [], RuntimeException    + 
FullyQualifiedErrorId : InvokeMethodOnNull ",
      "timezone": "India Standard Time",
      "processor0": "Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz",
      "dmi": "{\"manufacturer\"=>\"American Megatrends Inc.\", 
\"product\"=>{\"name\"=>\"All Series\", \"serial_number\"=>\"System Serial 
Number\"}}",
      "virtual": "physical",
      "ruby": "{\"platform\"=>\"x64-mingw32\", \"sitedir\"=>\"C:/Program 
Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/site_ruby/2.1.0\", 
\"version\"=>\"2.1.9\"}",
      "puppet_sslpaths": 
"{\"privatedir\"=>{\"path\"=>\"C:/ProgramData/PuppetLabs/puppet/etc/ssl/private\",
 
\"path_exists\"=>true}, 
\"privatekeydir\"=>{\"path\"=>\"C:/ProgramData/PuppetLabs/puppet/etc/ssl/private_keys\",
 
\"path_exists\"=>true}, 
\"publickeydir\"=>{\"path\"=>\"C:/ProgramData/PuppetLabs/puppet/etc/ssl/public_keys\",
 
\"path_exists\"=>true}, 
\"certdir\"=>{\"path\"=>\"C:/ProgramData/PuppetLabs/puppet/etc/ssl/certs\", 
\"path_exists\"=>true}, 
\"requestdir\"=>{\"path\"=>\"C:/ProgramData/PuppetLabs/puppet/etc/ssl/certificate_requests\",
 
\"path_exists\"=>true}, 
\"hostcrl\"=>{\"path\"=>\"C:/ProgramData/PuppetLabs/puppet/etc/ssl/crl.pem\", 
\"path_exists\"=>true}}",
      "identity": "{\"privileged\"=>true, 
\"user\"=>\"WORKGROUP\\\\SDIN-SWT-FVT-11$\"}",
      "agent_specified_environment": "production",
      ...
      ...
      "memory": "{\"system\"=>{\"available\"=>\"29.14 GiB\", 
\"available_bytes\"=>31289233408, \"capacity\"=>\"8.59%\", 
\"total\"=>\"31.88 GiB\", \"total_bytes\"=>34229575680, \"used\"=>\"2.74 
GiB\", \"used_bytes\"=>2940342272}}",
      "serialnumber": "System Serial Number",
      "kernel": "windows",
      "operatingsystem": "windows",
      "osfamily": "windows",
      "package_provider": "windows",
      "service_provider": "windows",
      "id": "WORKGROUP\\SDIN-SWT-FVT-11$",
      "architecture": "x64",
      "hardwareisa": "x64",
      "rubyplatform": "x64-mingw32",
      "hardwaremodel": "x86_64"
    },
=================================================================================================================================

Format 2:
=======
"macecf4bb651449.automationlab.net": {
      "duts": null,
      "puppet_sslpaths": null,
      "memory": null,
      "networking::interfaces::Ethernet": null,
      "puppet_sslpaths::publickeydir": null,
      "puppet_sslpaths::requestdir": null,
      "processors": null,
      ...
      ...
      "networking::mac": "EC:F4:BB:65:14:49",
      "macaddress": "EC:F4:BB:65:14:49",
      "networking::primary": "Ethernet",
      "interfaces": "Ethernet",
      "duts::DUT_0::ConfigManagerUserConfig": "FALSE",
      "network6_Ethernet": "fe80::%4",
      "networking::interfaces::Ethernet::network6": "fe80::%4",
      "network6": "fe80::%4",
      "networking::network6": "fe80::%4",
      "networking::interfaces::Ethernet::ip6": 
"fe80::51cf:337a:cf61:e5b4%4",
      "networking::ip6": "fe80::51cf:337a:cf61:e5b4%4",
      "ipaddress6": "fe80::51cf:337a:cf61:e5b4%4",
      "ipaddress6_Ethernet": "fe80::51cf:337a:cf61:e5b4%4",
      "netmask6": "ffff:ffff:ffff:ffff::",
      "netmask6_Ethernet": "ffff:ffff:ffff:ffff::",
      "networking::interfaces::Ethernet::netmask6": "ffff:ffff:ffff:ffff::",
      "networking::netmask6": "ffff:ffff:ffff:ffff::",
      "duts::DUT_0::MediaType": "Fixed hard disk media",
      "processors::models": "[\"Intel(R) Core(TM) i7-3540M CPU @ 
3.00GHz\"]",
      "processor0": "Intel(R) Core(TM) i7-3540M CPU @ 3.00GHz",
      "dmi::product::name": "Latitude E6430",
      "model": "Latitude E6430",
      "productname": "Latitude E6430",
      "networking::hostname": "macECF4BB651449",
      "hostname": "macECF4BB651449",
      "duts::DUT_0::SystemName": "MACECF4BB651449",
      "clientcert": "macecf4bb651449.automationlab.net",
      "networking::fqdn": "macECF4BB651449.automationlab.net",
      "fqdn": "macECF4BB651449.automationlab.net",
      "duts::DUT_0::Status": "OK",
      "timezone": "Pacific Standard Time",
      "virtual": "physical",
      "duts::DUT_0::Name": "\\\\.\\PHYSICALDRIVE0",
      "duts::DUT_0::DeviceID": "\\\\.\\PHYSICALDRIVE0",
      "agent_specified_environment": "production",
      "duts::DUT_0::Caption": "SanDisk SD7SB2Q010T1001",
      "duts::DUT_0::Model": "SanDisk SD7SB2Q010T1001",
      "duts::DUT_0::InterfaceType": "SCSI",
      "duts::DUT_0::Manufacturer": "(Standard disk drives)",
      "puppet_sslpaths::requestdir::path_exists": "true",
      "puppet_sslpaths::certdir::path_exists": "true",
      "puppet_sslpaths::publickeydir::path_exists": "true",
      "identity::privileged": "true",
      "puppet_sslpaths::privatedir::path_exists": "true",
      "puppet_sslpaths::privatekeydir::path_exists": "true",
      "puppet_sslpaths::hostcrl::path_exists": "true",
      "duts::DUT_0::MediaLoaded": "TRUE",
      "duts::DUT_0::SystemCreationClassName": "Win32_ComputerSystem",
      "duts::DUT_0::CreationClassName": "Win32_DiskDrive",
      "osfamily": "windows",
      "service_provider": "windows",
      "os::family": "windows",
      "os::name": "windows",
      "operatingsystem": "windows",
      "kernel": "windows",
      "package_provider": "windows",
      "id": "WORKGROUP\\MACECF4BB651449$",
      "identity::user": "WORKGROUP\\MACECF4BB651449$",
      ...
      ...
      "os::hardware": "x86_64",
      "duts::DUT_0::FirmwareRevision": "Z0076ylT"
    },

In the first format, the fact values are displayed in nested json format 
whereas in second one it is segregated json format.

Am I missing any configuration from Foreman or is an existing bug?
How to change the fact values response in first json format?

Anybody please help me out in fix it.

Thanks and regards
Amrit

-- 
You received this message because you are subscribed to the Google Groups 
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to