On Wed, Jan 13, 2010 at 1:24 PM, JoE <joehil...@gmail.com> wrote: > Hi all, > > Currently I am trying to have a script run whenever a change is made > to it. Here is an example of when my configurations look like: > > file { "/usr/bin/data/": > owner => "rot", > group => "wheel", > mode => "755", > purge => true, > recurse => true, > source => "puppet://puppet/data/bin/"; > } > > exec { "/usr/bin/data/get-data.sh restart": > subscribe => "/usr/bin/data/get-data.sh", > refreshonly => true; > } >
try with a resource reference. the syntax is: File['/usr/bin/data/get-data.sh'] I am not 100% sure this will work, you may have to subscribe to the dir (let me know :) > > The script is contained in /usr/bin/data/ which is managed by Puppet. > But when I try to run this I get the following error: > > err: Could not create /usr/bin/data/get_data.sh restart: Parameter > subscribe failed: Relationships must be resource references at /usr/ > local/etc/puppet/modules/data/manifests/init.pp:237 > warning: Not using cache on failed catalog > warning: Configuration could not be instantiated: Parameter subscribe > failed: Relationships must be resource references at /usr/local/etc/ > puppet/modules/data/manifests/init.pp:23 > > Is there a way to have a script subscribe to itself? > > Thank you for you help. > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to puppet-us...@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscr...@googlegroups.com<puppet-users%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > > > >--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.