Hello everyone, I'm working with hashs to create/delete folders and mount NFS, and I would like to obtain 2 hashs from the hash the user enters,but I have not been able to split it. I would like filter using the key-value "ensure => absent".
{ "folder" => { "/one" => { owner => root, group => root} "/two" => { owner => root, group => root} "/three" => { owner => john, group => users} } "nfs" => { "/one" => { nfsfolder => "nfsserver:/export1", ensure => "mounted" } "/two" => { nfsfolder => "nfsserver:/export2", ensure => "absent" } "/three" => { nfsfolder => "nfsserver:/export3", ensure => "absent" } } } Create hash { "folder" => { "/one" => { owner => root, group => root}} "nfs" => { "/one" => { nfsfolder => "nfsserver:/export1", ensure => "mounted" } } } Delete hash { "folder" => { "/one" => { owner => root, group => root} "/two" => { owner => root, group => root} } "nfs" => { "/two" => { nfsfolder => "nfsserver:/export2", ensure => "absent" } "/three" => { nfsfolder => "nfsserver:/export3", ensure => "absent" }} } once I get this I'll use "Create hash" to create hash[folder] and mounted it with hash[nfs] values, and "Delete hash" to umount and after delete the folder. Do you know if it possible to do something like that? I think in another language would be easy to do, but I have tried with each, filter, merge... and the most similar thing I get is notifying the values I want in each iteration, but not assigning them to new hash var. I'm working with puppet version: 5.5.12 Tank you very much -- 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/99fea62a-eae9-4018-83d0-a6a60f8b67c5n%40googlegroups.com.