2008/10/31 kuhlen@gmx.net <kuhlen@gmx.net>:>
> Hi, I''m new to puppet.
> here''s my config:
>
> define touchfile {
> exec { "/usr/bin/touch $title": }
> }
>
> file { "/etc/host.conf":
> notify => touchfile["/var/tmp/touchfile.txt"],
> }
>
so I think you''re using defines like functions, which they
aren''t. A
define is just a way to group multiple resources together as a single
resource. If you want to use the resource
touchfile["/var/tmp/touchfile.txt"], you need to actually create it:
touchfile { "/var/tmp/touchfile.txt": }
In which case puppet is going to run that exec regardless if its been
notified or not. You''ll probably want to throw a ''refreshonly
=>
true'' on the exec...
Also, you should use ''notify =>
Touchfile["/var/tmp/touchfile.txt"]''..
.r''
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---