One thing you might want to try, which could resolve the issue is use cwd
meta for exec. I would also split the actions up, like below, with
refreshonly meta set to true so it doesnt execute them on every puppet run.
You would need a resource that would trigger them, like package install or
something.

exec { "redmine-db-migrate":
     command => "rake db:migrate",
     refreshonly => true
}

exec { "redmine-install-gems":
     command => "rake gems:install",
     refreshonly => true,
     notify => Exec[redmine-db-migrate]
}

On Fri, Oct 7, 2011 at 5:03 PM, damniamgood <kotharini...@gmail.com> wrote:

> Hello,
>        I have master and agent puppet server setup and i am running
> the manifest which includes the exec block
>
> exec{"install-gems":
>      command => "cd /opt/redmine/current && rake gems:install && rake
> db:migrate",
> }
>
>
> When i run on the client side , the execution of the install-gems
> fails and returns non-zero.
>
> Can you possibly tell the reason ?
>
> Is there any other way to handle this.?
>
> --
> 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.
>
>

-- 
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