Issue #11563 has been updated by Josh Cooper.
Status changed from Accepted to Needs More Information
Assignee set to Feifei Jia
I was mistaken earlier about this being a template issue. I am able to use
templates without any issues. I was confused earlier because there are two
different things going on.
The first is #10417, which is made worse because show_diff is now enabled
whenever --test is specified on the command line.
Second, the path parameter is getting set to the literal value you specify, not
the expanded PATH environment variable:
<pre>
exec { 'setup_env.bat':
..
path => 'c:\download;%PATH%',
..
</pre>
So puppet is able to launch your script, but likely your script can't execute
anything beyond that. As far as I know there is no way to prepend or append
path parameters like you are doing.
Try specifying the fully expanded `path` parameter in your manifest, e.g. `path
=> 'c:\downloads;c:\windows\system32;c:\windows;c:\ruby187\bin` and run with
the following arguments:
<pre>
puppet agent --no-daemonize --onetime --no-show_diff --debug --trace --server
<server>
</pre>
----------------------------------------
Bug #11563: Can not create file in Windows 2008
https://projects.puppetlabs.com/issues/11563
Author: Feifei Jia
Status: Needs More Information
Priority: Normal
Assignee: Feifei Jia
Category: windows
Target version: 2.7.x
Affected Puppet version: 2.7.9
Keywords:
Branch:
I've tested Puppet client in Windows 2008 recently, on EC2 instance.
One problem I found is that, after I a first time successfully run, I
encountered "CreateProcess() failed" error:
<pre>
info: Caching catalog for ip-xxxxxxxx.ec2.internal
info: Applying configuration version '1324881415'
err: /Stage[main]//Node[ip-xxxxxxxx.ec2.internal]/Foo::Set_role[chrome]/File
[c:\download\setup_env.bat]: Could not evaluate: CreateProcess() failed: The
system cannot find the file specified.
notice: /Stage[main]//Node[ip-xxxxxxxx.ec2.internal]/Foo::Set_role[chrome]/E
xec[setup_env.bat]: Dependency File[c:\download\setup_env.bat] has failures:
tru e warning:
/Stage[main]//Node[ip-xxxxxxxx.ec2.internal]/Foo::Set_role[chrome]/
Exec[setup_env.bat]: Skipping because of failed dependencies
</pre>
Related manifests:
<pre>
class foo {
define set_role ($role) {
file { 'c:\download\setup_env.bat':
ensure => file,
provider => windows,
content => template("foo/setup_env.bat.erb"),
}
exec { 'setup_env.bat':
cwd => 'c:\download',
path => 'c:\download;%PATH%',
provider => windows,
require => File['c:\download\setup_env.bat'],
}
}
}
</pre>
When I remove c:\download\setup_env.bat file, I can retrieve this file from
Puppet master, and execute well.
Puppet 2.7.9
Facter 1.6.4
Windows 2008 Datacenter SP2
Any hints?
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://projects.puppetlabs.com/my/account
--
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-bugs?hl=en.