On Wednesday, November 1, 2017 at 6:07:49 AM UTC-5, Martijn wrote: > > Well, if you do $disks = facts['os']['disks'] (note: facts, not facter), > you'll have a hash of all disks in $disks. Some of the functions in > puppetlabs-stdlib let you modify hashes. Take a look at delete > <https://forge.puppet.com/puppetlabs/stdlib#delete> to drop keys like > 'fd0' and 'sda' from the hash, then you can use the remaining hash as input > for the LVM module. > > I have always thought that the stdlib docs are a bit colloquial and imprecise where they describe functions that supposedly modify an array or hash. What they actually do, I think, is create a *new* array or hash whose contents match the original, except for the specified modifications. This is the same distinction as between Ruby's Array.reject! and Array.reject, and although it's a bit subtle, it makes a tremendous difference. It therefore behooves us to be as clear as possible.
John -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/fc5ef90e-e4f4-42b4-be17-5fd43947ea02%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.