- From: "Jason J. W. Williams" <
>
- To:
- Subject: [chef] only_if conditions key off exit value?
- Date: Fri, 16 Sep 2011 02:35:32 -0600
I'm having some issues with an only_if condition that works on Linux
but seems to be having issues on Solaris, and I want to make sure I
understand how Chef is handling it.
I have an only_if as follows:
only_if "mysql -u root -h localhost -e 'SHOW STATUS;'"
If the MySQL root user still has no password, the command will succeed
and the exit status will be 0. However, if the root user now has a
password, the command will fail and the exit status will be 1. My
understanding is the the only_if will be True if the exit status from
the command is 0. Is this incorrect?
-J
- [chef] only_if conditions key off exit value?, Jason J. W. Williams, 09/16/2011
Archive powered by MHonArc 2.6.16.