Argh. I have the definition below. The gluster peer probe command has
already been executed successfully, and I'm testing it with 'peer
status'. Running the unless=> command yields:
root@gfs01:~# /usr/sbin/gluster peer status | /bin/grep gfs02.us1.xxx.com
Hostname: gfs02.us1.xxx.com
root@gfs01:~# echo $?
0
Therefore, the command should never run again, but it is, as evidenced
by the fact that /tmp/foo keeps getting X appended to it.
define glusterfs::probe_peer ( $ensure, $master_node ) {
if $master_node == $::fqdn {
case $ensure {
'probed': {
exec {
"add-peer-$name":
#command => "/usr/sbin/gluster peer probe $name",
command => "/bin/echo X >> /tmp/foo",
logoutput => true,
unless => "/usr/sbin/gluster peer status |
/bin/grep $name";
}
}
}
}
}
Doug.
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.