I'm using a similar onlyif in 0.24.6 and it's working correctly for me.
Looking at your code, the only thing I can see that might cause it to
fail is the path. 'nc' is usually under '/usr/bin', so with the path
set to just '/bin' the onlyif command wouldn't run successfully, if
that's the case on your clients?
Rob
Matt wrote:
> Haven't tried this in 0.24.5 so not sure if it worked, but i'm trying to do:
>
> exec { "tar -zxf ../$dist":
> cwd => "/opt/app",
> creates => "/opt/app/lib",
> require => Exec["get-dist"],
> path => "/bin",
> onlyif => "nc -z $otherappdns 10098",
> before => Exec["somethingelse"],
> }
>
> With the onlyif in place this just runs on the client and fails on a
> later stage as this tar command actually doesn't run. If I comment
> out the onlyif it runs through fine.
>
> If I substitute $otherappdns with the hardcoded value, it still
> behaves the same. I've performed the onlyif command on the client and
> confirmed that 'echo $?' returns a 0.
>
> If I switch the onlyif to a unless and change 10098 to 10099 so it
> doesn't return a 0, then it performs as it should and untars the file.
>
> Is this a bug in 0.24.6?
>
> Thanks,
>
> Matt
>
>
--
Robert Fay [EMAIL PROTECTED]
System Administrator office: 220
High Energy Physics Division tel (int): 43396
Oliver Lodge Laboratory tel (ext): +44 (0)151 794 3396
University of Liverpool http://www.liv.ac.uk/physics/hep/
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---