On Fri, Jul 06, 2012 at 08:44:51AM -0700, jcbollinger wrote:
> 
> 
> On Friday, July 6, 2012 2:10:13 AM UTC-5, Hendrik Jäger wrote:
> >
> > [...] let a shell 
> > execute your command [...]
> >
> 
> Which you can do fairly easily by adding "provider => 'sh'" to your Exec's 
> parameters.
> 
> Or if you need a non-default shell or you just like doing things the hard 
> way, then you can use a variation on
> 
> bash -c 'my command here'
> 
> as your command.

Instead of doing these kinds of work-arounds I'd just use the cwd
parameter of the exec resource as described in the type reference [1]

so e.g.

    exec { 'make_sendmail':
      command => '/usr/bin/make',
      cwd     => '/etc/mail'
    }

If you have GNU make you can also ask the make command itself to change
the directory (-C dir, --directory=dir)

[1] http://docs.puppetlabs.com/references/latest/type.html#exec

-Stefan

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to