Fabien COMBERNOUS
2012-Apr-19 08:53 UTC
[Puppet Users] ensure file content with filename different on each host
Hi, I have several hosts. Each host have to contain a file like /a/path/com.apple.screensaver.BC2A8418-FC5B-5825-B3F1-0072B100A4B4.plist. The content have to be the same on all hosts. But the BC2A8418-FC5B-5825-B3F1-0072B100A4B4 part of the file name is different on each host. Is it possible to manage this situation with puppet ? If yes how ? Regards, -- *Fabien COMBERNOUS* /unix system engineer/ www.kezia.com <http://www.kezia.com/> *Tel: +33(0)4 6787 0704 / +33(0)6 2584 0337* Kezia -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Fabien
2012-Apr-19 10:34 UTC
[Puppet Users] Re: ensure file content with filename different on each host
Great help was provided by irc. Here the manifest : class screensaver { $username = admin file { "/Users/$username/Library/Preferences/ByHost/ com.apple.screensaver.$::sp_platform_uuid.plist": owner => $username, group => staff, mode => 600, ensure => present, source => "puppet:///modules/screensaver/ com.apple.screensaver.plist" } } On 19 avr, 04:53, Fabien COMBERNOUS <fcombern...@kezia.com> wrote:> Hi, > > I have several hosts. Each host have to contain a file like > /a/path/com.apple.screensaver.BC2A8418-FC5B-5825-B3F1-0072B100A4B4.plist. The > content have to be the same on all hosts. But the > BC2A8418-FC5B-5825-B3F1-0072B100A4B4 part of the file name is different > on each host. > > Is it possible to manage this situation with puppet ? If yes how ? > > Regards, > -- > *Fabien COMBERNOUS* > /unix system engineer/www.kezia.com<http://www.kezia.com/> > *Tel: +33(0)4 6787 0704 / +33(0)6 2584 0337* > Kezia-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.