cko
2013-Jul-15 09:53 UTC
[Puppet Users] Puppet run fails with service, succeeds with "puppet agent -t"
hi everybody, im trying to install a package on a windows server host. my source parameter looks like this: $package_filename = "check-mk-agent-1.2.3i1.exe" $package_name = "Check_MK Agent 1.2.3i1" package { "$package_name": ensure => installed, provider => windows, source => "\\\server/install/Tools/check_mk-agent/$package_filename", install_options => [''/S'', ''/D=C:\check_mk''] } here is the problem: when i run "puppet agent -t" on the server , it works and the package is installed. but when the puppet service (every 30 minutes) runs, there is an error: change from absent to present failed: The source does not exist: ''\\server\install\Tools\check_mk-agent\check-mk-agent-1.2.3i1.exe'' when i open the directory (\server\install\Tools\check_mk-agent\check-mk-agent-1.2.3i1.exe) the file opens. how can i fix this? thank you -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Josh Cooper
2013-Jul-15 16:38 UTC
Re: [Puppet Users] Puppet run fails with service, succeeds with "puppet agent -t"
On Mon, Jul 15, 2013 at 2:53 AM, cko <dertune@gmail.com> wrote:> hi everybody, > > im trying to install a package on a windows server host. my source > parameter looks like this: > > $package_filename = "check-mk-agent-1.2.3i1.exe" > $package_name = "Check_MK Agent 1.2.3i1" > > package { "$package_name": > ensure => installed, > provider => windows, > source => "\\\server/install/Tools/check_mk-agent/$package_filename", > install_options => [''/S'', ''/D=C:\check_mk''] > } > > > here is the problem: when i run "puppet agent -t" on the server , it works > and the package is installed. > > but when the puppet service (every 30 minutes) runs, there is an error: > > change from absent to present failed: The source does not exist: ''\\server\install\Tools\check_mk-agent\check-mk-agent-1.2.3i1.exe'' > > when i open the directory > (\server\install\Tools\check_mk-agent\check-mk-agent-1.2.3i1.exe) the file > opens. > > how can i fix this? >When puppet is running under the LocalSystem account, it does not have any credentials with which to access the network. As a result, if the remote server does not accept null sessions (which it shouldn''t), then you''ll get this error.[1] Of course, it works when you''re at the command prompt, because puppet is running as you, and has credentials to access the network. You can either enable null sessions (not recommended) or configure the puppet service to run under a domain user account. You''ll need to add the user account to the local Administrators group. Unfortunately, there is a bug in puppet that prevents it from being able to add domain users to the local group[2], though it''s very high on our list. In the meantime, you can use an exec resource to do that[3]. Josh [1] http://support.microsoft.com/kb/124184 [2] https://projects.puppetlabs.com/issues/17031 [3] https://ask.puppetlabs.com/question/1403/how-can-i-add-a-domain-user-to-the-local-administrators-group/ -- Josh Cooper Developer, Puppet Labs *Join us at PuppetConf 2013, August 22-23 in San Francisco - * http://bit.ly/pupconf13* **Register now and take advantage of the Early Bird discount - save 25%!* -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.