[Puppet Users] Re: using return value of a shell command as a puppet conditional

2011-05-09 Thread kcrwfrd
On Feb 5, 1:56 am, Nigel Kersten ni...@puppetlabs.com wrote: On Thu, Feb 3, 2011 at 11:45 AM, Nick Moffitt n...@zork.net wrote: Nigel Kersten: On Wed, Feb 2, 2011 at 5:10 PM, Daniel Pittman dan...@puppetlabs.com wrote: (Also, I went looking and found zero attempts to solve this in a

[Puppet Users] Re: using return value of a shell command as a puppet conditional

2011-05-09 Thread Nigel Kersten
On Mon, May 9, 2011 at 12:03 PM, kcrwfrd kcrw...@gmail.com wrote: On Feb 5, 1:56 am, Nigel Kersten ni...@puppetlabs.com wrote: On Thu, Feb 3, 2011 at 11:45 AM, Nick Moffitt n...@zork.net wrote: Nigel Kersten: On Wed, Feb 2, 2011 at 5:10 PM, Daniel Pittman dan...@puppetlabs.com wrote:

Re: [Puppet Users] Re: using return value of a shell command as a puppet conditional

2011-02-04 Thread Nigel Kersten
On Thu, Feb 3, 2011 at 11:45 AM, Nick Moffitt n...@zork.net wrote: Nigel Kersten: On Wed, Feb 2, 2011 at 5:10 PM, Daniel Pittman dan...@puppetlabs.com wrote: (Also, I went looking and found zero attempts to solve this in a reusable, FOSS way, let alone working solutions.) Yep. I've been

Re: [Puppet Users] Re: using return value of a shell command as a puppet conditional

2011-02-03 Thread Nick Moffitt
Nigel Kersten: On Wed, Feb 2, 2011 at 5:10 PM, Daniel Pittman dan...@puppetlabs.com wrote: (Also, I went looking and found zero attempts to solve this in a reusable, FOSS way, let alone working solutions.) Yep. I've been dreaming of a Puppet-integrated Password Safe for a while :) Alas!

Re: [Puppet Users] Re: using return value of a shell command as a puppet conditional

2011-02-03 Thread Jeff McCune
On Wed, Feb 2, 2011 at 1:52 PM, Ashley Gould ago...@ucop.edu wrote: On Mon, Jan 31, 2011 at 06:27:20PM -0800, Daniel Pittman wrote: In the longer term I would hope to have that information pushed out from the puppet system, so that if a node *should* be joined with centrifyDC puppet will make

Re: [Puppet Users] Re: using return value of a shell command as a puppet conditional

2011-02-02 Thread Ashley Gould
On Mon, Jan 31, 2011 at 06:27:20PM -0800, Daniel Pittman wrote: In the longer term I would hope to have that information pushed out from the puppet system, so that if a node *should* be joined with centrifyDC puppet will make it so, but until then what you have is great. I have considered

Re: [Puppet Users] Re: using return value of a shell command as a puppet conditional

2011-02-02 Thread Nigel Kersten
On Wed, Feb 2, 2011 at 10:52 AM, Ashley Gould ago...@ucop.edu wrote: On Mon, Jan 31, 2011 at 06:27:20PM -0800, Daniel Pittman wrote: In the longer term I would hope to have that information pushed out from the puppet system, so that if a node *should* be joined with centrifyDC puppet will make

Re: [Puppet Users] Re: using return value of a shell command as a puppet conditional

2011-02-02 Thread Daniel Pittman
On Wed, Feb 2, 2011 at 17:02, Nigel Kersten ni...@puppetlabs.com wrote: On Wed, Feb 2, 2011 at 10:52 AM, Ashley Gould ago...@ucop.edu wrote: On Mon, Jan 31, 2011 at 06:27:20PM -0800, Daniel Pittman wrote: In the longer term I would hope to have that information pushed out from the puppet

Re: [Puppet Users] Re: using return value of a shell command as a puppet conditional

2011-02-02 Thread Nigel Kersten
On Wed, Feb 2, 2011 at 5:10 PM, Daniel Pittman dan...@puppetlabs.com wrote: On Wed, Feb 2, 2011 at 17:02, Nigel Kersten ni...@puppetlabs.com wrote: On Wed, Feb 2, 2011 at 10:52 AM, Ashley Gould ago...@ucop.edu wrote: On Mon, Jan 31, 2011 at 06:27:20PM -0800, Daniel Pittman wrote: In the longer

[Puppet Users] Re: using return value of a shell command as a puppet conditional

2011-01-31 Thread cyrus
If I understand your question you want to use the exec resource and specify the onlyif (or unless) parameter. Sort of like: exec { cp /tmp/file1 /data, path = [ /bin ], onlyif = /usr/bin/my_harmless_binary; } On Jan 31, 2:12 pm, Ashley Gould ago...@ucop.edu wrote: Hi all, My

[Puppet Users] Re: using return value of a shell command as a puppet conditional

2011-01-31 Thread jcbollinger
On Jan 31, 3:12 pm, Ashley Gould ago...@ucop.edu wrote: Hi all, My first post.  I am just getting started with puppet and have made good progress with some basics using templates and files. I would like to perform and an action based on whether or not a particular system binary executes

Re: [Puppet Users] Re: using return value of a shell command as a puppet conditional

2011-01-31 Thread Ashley Gould
On Mon, Jan 31, 2011 at 02:14:29PM -0800, jcbollinger wrote: On Jan 31, 3:12 pm, Ashley Gould ago...@ucop.edu wrote: if [ /usr/bin/my_harmless_binary 21 /dev/null ]; then   echo my_harmless_binary succeeded   cp /tmp/file1 /data/ else   echo my_harmless_binary FAILED fi There are

Re: [Puppet Users] Re: using return value of a shell command as a puppet conditional

2011-01-31 Thread Daniel Pittman
On Mon, Jan 31, 2011 at 15:31, Ashley Gould ago...@ucop.edu wrote: On Mon, Jan 31, 2011 at 02:14:29PM -0800, jcbollinger wrote: On Jan 31, 3:12 pm, Ashley Gould ago...@ucop.edu wrote: if [ /usr/bin/my_harmless_binary 21 /dev/null ]; then   echo my_harmless_binary succeeded   cp /tmp/file1

Re: [Puppet Users] Re: using return value of a shell command as a puppet conditional

2011-01-31 Thread Ashley Gould
thank you both. my current task will use a file action. I'm trying to make puppet chose between alturnative versions of a file based on the result of a binary. I will work on the custom fact idea.  if such an issue is coming at me so early in the game, then I may as well get started

Re: [Puppet Users] Re: using return value of a shell command as a puppet conditional

2011-01-31 Thread Daniel Pittman
On Mon, Jan 31, 2011 at 18:14, Ashley Gould ago...@ucop.edu wrote: thank you both. my current task will use a file action. I'm trying to make puppet chose between alturnative versions of a file based on the result of a binary. [...] You caught me.  I'm a recoveing cfengine junky.  It will