On Tue, Jul 24, 2012 at 05:16:01PM -0700, Nikolaos Hatzopoulos wrote:
> Hi,
>
> I am trying to
> exec { myexectest:
> path => "/bin:/usr/bin:/usr/sbin",
> cwd => "/home/user/.ssh",
> command =>"echo test > test.txt",
> onlyif => "test -f test.txt"
I would have wrapped everything up in a shell script and simply named the shell script as the namevar, but that's just me.
> }
>
> it doesnt work any clues why? I think it cannot change directory to a DOT
> directory
Try running the agent in the foreground with debug on, that will give you a better error message.
/etc/init.d/puppet stop; puppet agent --debug --verbose --no-daemonize
(There are likely better flags, but I use that out of habit.)
> please HELP!!
>
> --Nikos Hatzopoulos
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To view this discussion on the web visit
> [1]https://groups.google.com/d/msg/puppet-users/-/KcN7MDyJrZQJ.
> To post to this group, send email to puppet...@googlegroups.com.
> To unsubscribe from this group, send email to
> puppet-users+unsubscribe@googlegroups.com.
On Tue, Jul 24, 2012 at 05:16:01PM -0700, Nikolaos Hatzopoulos wrote:
> Hi,
>
> I am trying to
> exec { myexectest:
> path => "/bin:/usr/bin:/usr/sbin",
> cwd => "/home/user/.ssh",
> command =>"echo test > test.txt",
> onlyif => "test -f test.txt"
I would have wrapped everything up in a shell script and simply named the shell script as the namevar, but that's just me.
> }
>
> it doesnt work any clues why? I think it cannot change directory to a DOT
> directory
Try running the agent in the foreground with debug on, that will give you a better error message.
/etc/init.d/puppet stop; puppet agent --debug --verbose --no-daemonize
(There are likely better flags, but I use that out of habit.)
> please HELP!!
>
> --Nikos Hatzopoulos
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To view this discussion on the web visit
> [1]https://groups.google.com/d/msg/puppet-users/-/KcN7MDyJrZQJ.
> To post to this group, send email to puppet...@googlegroups.com.
> To unsubscribe from this group, send email to
> puppet-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/AhkFwrLhMY4J.
To unsubscribe from this group, send email to puppet-users...@googlegroups.com.
exec { myexectest:
path => "/bin:/usr/bin:/usr/sbin",
cwd => "/home/user/.ssh",
creates => "/home/user/.ssh/test.txt"
command =>"echo test > test.txt",
}
http://docs.puppetlabs.com/references/latest/type.html#exec