Adding to this, we are using Foreman 1.13 and we are missing some 
configuration settings which is not giving the facts values output in JSON 
format in Foreman API.
Anybody please help on getting the facts values in JSON format.

Regards,
Amrit


On Friday, November 11, 2016 at 7:51:07 PM UTC+5:30, Vishal Sarin wrote:
>
> Hi All,
>
> I am using puppet Server version 4.7.0 and I see that facts are coming in 
> this format.
>
>      "networking::interfaces::Ethernet::dhcp": "10.65.250.10",
>       "networking::interfaces::Ethernet::ip": "10.65.250.14",
>       "ipaddress": "10.65.250.14",
>       "networking::ip": "10.65.250.14",
>       "ipaddress_Ethernet": "10.65.250.14",
>       "memory::system::used": "1.08 GiB",
>       "timestamp": "11/05/2016 07:46:56",
>       "memory::system::used_bytes": "1157337088",
>
> While I have another Server with Version 4.5.3 and I see that facts come 
> there in JSON format.
>
>
>  "networking": "{\"dhcp\"=>\"10.65.168.11\", \"domain\"=>\"
> sdcorp.global.sandisk.com\", \"fqdn\"=>\"
> Puppetest12345.sdcorp.global.sandisk.com\", 
> \"hostname\"=>\"Puppetest12345\", \"interfaces\"=>{\"Local Area Connection 
> 2\"=>{\"bindings\"=>[{\"address\"=>\"10.65.168.150\", 
> \"netmask\"=>\"255.255.248.0\", \"network\"=>\"10.65.168.0\"}], 
> \"bindings6\"=>[{\"address\"=>\"fe80::b45c:17f7:b3c1:fdd2%13\", 
> \"netmask\"=>\"ffff:ffff:ffff:ffff::\", \"network\"=>\"fe80::%13\"}], 
> \"dhcp\"=>\"10.65.168.11\", \"ip\"=>\"10.65.168.150\", 
> \"ip6\"=>\"fe80::b45c:17f7:b3c1:fdd2%13\", \"mac\"=>\"30:5A:3A:4B:06:52\", 
> \"mtu\"=>1500, \"netmask\"=>\"255.255.248.0\", 
> \"netmask6\"=>\"ffff:ffff:ffff:ffff::\", \"network\"=>\"10.65.168.0\", 
> \"network6\"=>\"fe80::%13\"}}, \"ip\"=>\"10.65.168.150\", 
> \"ip6\"=>\"fe80::b45c:17f7:b3c1:fdd2%13\", \"mac\"=>\"30:5A:3A:4B:06:52\", 
> \"mtu\"=>1500, \"netmask\"=>\"255.255.248.0\", 
> \"netmask6\"=>\"ffff:ffff:ffff:ffff::\", \"network\"=>\"10.65.168.0\", 
> \"network6\"=>\"fe80::%13\", \"primary\"=>\"Local Area Connection 2\"}",
>
> Can some please explain what that above (first one) format is and is there 
> any puppet configuration I can set to get O/p in JSON format?
>
> Alternately if that is not possible please let me know how can I convert 
> this format to JSON. 
>
> Any help is appreciated.
>
> Thanks & Regards,
> -Vishal
>

-- 
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