ただしdpkgは利用しない
方法
root@hostname:/home/shimizu# ohai packages | jq 'keys' [ "acl", "acpi", "acpi-support-base", "acpid", "adduser", "amap-align", "ant", "ant-optional", "antlr", "apache2", "apache2-bin", "apache2-data", "apache2-utils", "apt", "apt-file", "apt-show-versions", "apt-utils", "aptitude", "aptitude-common", ...
ohai
chefで内部的に使っているRubyライブラリ
root@hostname:/home/shimizu# gem install ohai
...
root@hostname:/home/shimizu# gem list | grep ohai
ohai (8.16.0)
root@hostname:/home/shimizu# ohai
{
"network": {
"interfaces": {
"lo": {
"mtu": "65536",
"flags": [
...
root@hostname:/home/shimizu# ohai packages
{
"acl": {
"version": "2.2.52-2"
},
"acpi": {
"version": "1.7-1"
},
"acpi-support-base": {
"version": "0.142-6"
},
...