or
Avishai Ish-Shalom (@nukemberg)
And the guy that built the system had just quit....
(Severe case of NIH syndrome)
But...
Numbers didn't add up
facter --json | curl -XPUT -d @- http://elasticsearch:9200/inventory/host/`hostname -f`
case $::kernel {
'Linux': {
ensure_resource(package, curl, {ensure => present})
exec{"inventory-facter":
command => "facter --json -p | curl -XPUT ${es_uri} -d @- || true",
provider => shell,
schedule => 'twice-a-day'
}
}
'windows': {
exec{'inventory-facter':
command => template("sg_base/inventory-command.ps1.erb"),
provider => powershell,
schedule => 'twice-a-day'
}
}
default: {
warn("Facter inventory class does not support $kernel")
}
}
node default {
include sg_base
if $::role != undef {
include "roles::${::role}"
}
}
:hierarchy:
- "node/%{::clientcert}"
- "dc/%{::dc}"
- "environment-role/%{::environment}/%{::role}"
- "role/%{::role}"
- "environment/%{::environment}"
- "kernel/%{::kernel}"
- common
(Applaud like your life depends on it)