Am 20.01.14 09:02, schrieb Robert Turk:
You can get list of directories under /Users from facter and then
build an array out of it and use this in your manifest.
I tested your solution and here is what I have done:
I created a custom fact which returns a list of directories under /Users:
facter local_user_list => user1,user2
Next in puppet I created the following code:
class wallpaper_plist {
$array_userlist=split($local_user_list,',')
case $macosx_productversion_major {
'10.8': { $plist_name = 'com.apple.desktop_10.8.plist' }
'10.6': { $plist_name = 'com.apple.desktop_10.6.plist' }
default: { warn( 'macosx_productversion_major does not
match 10.8 or 10.6' ) }
}
define user_resource {
file {
"/Users/${name}/Library/Preferences/com.apple.desktop.plist":
owner => "${name}",
group => 'staff',
mode => 600,
ensure => file,
source => "puppet:///modules/wallpaper_plist/${plist_name}",
}
}
user_resource { $array_userlist: }
}
This code works, but it gives me a directory for the file resource. And
not a file like it is said in the code.
Any ideas?
Robert
--
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/52E7B206.2050805%40reproflex.de.
For more options, visit https://groups.google.com/groups/opt_out.