Thanks for all your help! > Since you're unzipping a bzipped tarball, tar probably needs to run > the `bzip2' command. But, at least on my system, that's > in /usr/bin, not /bin. Find out where the bzip2 command is located > and make sure that's also in path.
That's what finally solved my problem. I guess in the future I will always put root's $PATH into any exec path... Christian On 30 Jun., 01:43, Joe McDonagh <joseph.e.mcdon...@gmail.com> wrote: > Responses in-line.> The single qoutes are a relict from my different > approaches to solve > > the problem... > > With and without them the same error occurs: > > > err: //allgemein::bigbrother/Exec[untar bb19c]/returns: change from > > notrun to 0 failed: tar -jxf bb19c.tar.bz2 returned 2 instead of one > > of [0] at /etc/puppet/modules/allgemein/manifests/bigbrother.pp:22 > > You want > > command => "/bin/tar -C $somedirectory -jxf /path/to/bb19x.tar.bz2, > require => File["/path/to/bb19x.tar.bz2"]; > > or the require to whatever exec downloads that file.> My guess is that puppet > executes tar from the from directory but > > commands like > > "cd /usr/local&& tar -jxf bb19c.tar.bz2" > > or > > "tar -jxf /usr/local/bb19c.tar.bz2" > > also return that error... > > cd is a shell built-in. Puppet uses exec functions in exec resources. To > use shell built-ins you need to do something like: > > command => "/bin/bash -c 'pushd somedir && dosomething'", > > -- > -- > Joe McDonagh > Operations Engineer > AIM: YoosingYoonickz > IRC: joe-mac on freenode > "When the going gets weird, the weird turn pro." -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@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.