Hi, i would like to complete the disks fact with information about scsi port. So, I have this custom fact:
Facter.add(:disks, :type => :aggregate) do
chunk(:scsiports) do
disks = {}
Facter.value(:disks).each do |disk, values|
disks[disk] = {
'scsiport' => Facter::Core::Execution.exec("find -L /dev/disk/by-path/ -samefile /dev/#{disk} | awk -F'[:.]' '{print $6}'"),
}
end
disks
end
end
But the result do not aggregate nothing to disks core fact. But if I change the name to one unused ie: Facter.add(:disks_custom) the output is correct:
facter -p disks_custom
{
sda => {
scsiport => "0"
},
sdb => {
scsiport => "1"
},
sdc => {
scsiport => "2"
}
}
It is possible what I want to get? Or I need to make a full new fact with all the information.
Apologize my poor english and thanks in advance.