Mh. It seems I spoke too hasty. exec{ }s which aren't actually executed -
e.g. via a successful unless: condition - don't seem
to cause $? to become 2. Notify does, though, and this doesn't feel right.
Anyway, the pressure is gone for me.
Thanks anyway and regards,
Torsten
Am Freitag, 16. August 2013 15:30:48 UTC+2 schrieb Torsten Lüttgert:
>
> Hello group,
>
> is there a way to make puppet NOT return 2 if only exec{ } and notify{ }
> were called?
>
> Background is as follows:
> I'm calling puppet agent via cron on my hosts, and I want to get mails if
> something changes.
> For this, I used the exit code of "puppet agent
> --test --detailed-exitcodes", which should be 2 then (or 4/6 on error).
>
> Now, every stupid notify { } or exec{ } causes $? to be 2. Without notify
> I could live, but
> exec{ } (even with a failed precondition) also makes $?==2, and I need
> that.
>
> Is there any way around this?
>
> Thanks for any help,
> Torsten
>
>
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.