Arnau Bria
2008-11-18 10:00:19 UTC
Hi all,
Hi have something like:
file { "/opt/localconf/gLite3.1/yaim":
ensure => directory,
recurse => "true",
owner => "root",
group => "root",
mode => "755",
source => "puppet://gridinstall01.pic.es/files/opt/localconf/gLite3.1/yaim",
notify => Exec["yaim_conf"],
}
exec { "yaim_conf":
command => "/opt/glite/yaim/bin/yaim -c -s /opt/localconf/gLite3.1/yaim/pic/site-info.def -n glite-WN",
subscribe => File["/opt/localconf/gLite3.1/yaim"],
timeout => "-1",
}
And I'm trying to run yaim_conf ONLY if something changes in
files /opt/localconf/gLite3.1/yaim.
In the example I have notify and subscribe, but I've been playing with
only one, with only the other and both, and ALWAYS exec "yaim_conf" is
executed.
subscribe
One or more objects that this object depends on. Changes in the subscribed to objects result in the dependent objects being refreshed (e.g., a service will get restarted). For instance:
[...]
Currently the exec, mount and service type support refreshing.
SO exec should work, am I wrong?
notify
This parameter is the opposite of subscribe -- it sends events to the specified object:
[...]
This will restart the sshd service if the sshd config file changes.
It only talks about services, but is exec also supported?
**When doing something like:
notify => Service[sshd],
it di not work, I had to change to service[sshd] (notice no capital
letter in Services)... which is the correct syntax?
TIA,
Arnau
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To post to this group, send email to puppet-***@googlegroups.com
To unsubscribe from this group, send email to puppet-users+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---
Hi have something like:
file { "/opt/localconf/gLite3.1/yaim":
ensure => directory,
recurse => "true",
owner => "root",
group => "root",
mode => "755",
source => "puppet://gridinstall01.pic.es/files/opt/localconf/gLite3.1/yaim",
notify => Exec["yaim_conf"],
}
exec { "yaim_conf":
command => "/opt/glite/yaim/bin/yaim -c -s /opt/localconf/gLite3.1/yaim/pic/site-info.def -n glite-WN",
subscribe => File["/opt/localconf/gLite3.1/yaim"],
timeout => "-1",
}
And I'm trying to run yaim_conf ONLY if something changes in
files /opt/localconf/gLite3.1/yaim.
In the example I have notify and subscribe, but I've been playing with
only one, with only the other and both, and ALWAYS exec "yaim_conf" is
executed.
subscribe
One or more objects that this object depends on. Changes in the subscribed to objects result in the dependent objects being refreshed (e.g., a service will get restarted). For instance:
[...]
Currently the exec, mount and service type support refreshing.
SO exec should work, am I wrong?
notify
This parameter is the opposite of subscribe -- it sends events to the specified object:
[...]
This will restart the sshd service if the sshd config file changes.
It only talks about services, but is exec also supported?
**When doing something like:
notify => Service[sshd],
it di not work, I had to change to service[sshd] (notice no capital
letter in Services)... which is the correct syntax?
TIA,
Arnau
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To post to this group, send email to puppet-***@googlegroups.com
To unsubscribe from this group, send email to puppet-users+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---