Re: [Puppet Users] exec's onlyif parameter fails for a bash one-liner

2012-04-25 Thread Craig Dunn
On 25/04/2012 17:01, Shantanu wrote: I would like to 'exec' an installation script 'onlyif' an installation directory is empty. I tried using following bash one-liner however it didn't work: exec{$one_install_script: require => File[$one_install_script], onlyif => "[ \"$(/bin/ls

Re: [Puppet Users] exec's onlyif parameter fails for a bash one-liner

2012-04-25 Thread Florian Koch
Hi, you need to add provider => shell to your exec to get the subshell working regards Florian On Wed, Apr 25, 2012 at 6:01 PM, Shantanu wrote: > > I would like to 'exec' an installation script 'onlyif' an installation > directory is empty. I tried using following bash one-liner however it > d

[Puppet Users] exec's onlyif parameter fails for a bash one-liner

2012-04-25 Thread Shantanu
I would like to 'exec' an installation script 'onlyif' an installation directory is empty. I tried using following bash one-liner however it didn't work: exec{$one_install_script: require => File[$one_install_script], onlyif => "[ \"$(/bin/ls -A $one_location)\" ] && exit 1 || exit 0"