I have written a simple puppet program and it's throwing an error
Any help from here will be appreciated
Puppet program:
package { 'ultravnc':
ensure => latest,
provider => 'chocolatey',
}
file { 'C:\Program Files\uvnc bvba\UltraVnc':
ensure => 'present',
source => 'puppet:///modules/nrhlteamcity/UltraVNC.ini',
}
service { 'uvnc_service':
ensure => 'running',
}
Package['ultravnc'] -> File['C:\Program Files\uvnc bvba\UltraVnc'] ~> Service['uvnc_service']
Error:
Applying configuration version '48ad96db3a314f99325dde5f328dab1e54c98a00' Error: Could not set 'file' on ensure: No such file or directory @ dirsmkdir - C:/Program Files/uvnc bvba/UltraVnc2017 0508-5836-rk38fl.lock at /etc/puppetlabs/code/environments/production/site/nrhlteamcity/manifests/ultravnc.pp:13 Error: Could not set 'file' on ensure: No such file or directory @ dirsmkdir - C:/Program Files/uvnc bvba/UltraVnc2017 0508-5836-rk38fl.lock at /etc/puppetlabs/code/environments/production/site/nrhlteamcity/manifests/ultravnc.pp:13 Wrapped exception: No such file or directory @ dirsmkdir - C:/Program Files/uvnc bvba/UltraVnc20170508-5836-rk38fl.lock Error: /Stage[main]/Nrhlteamcity::Ultravnc/File[C:\Program Files\uvnc bvba\UltraVnc]/ensure: change from absent to file failed: Could not set 'file' on ensure: No such file or directory @ dirsmkdir - C:/Program Files/uvnc bvba/UltraVnc201 70508-5836-rk38fl.lock at
I was expecting the Puppet will get the package and install the ULTRAVNC module which actually creates a directory (C:\Program Files\uvnc bvba\UltraVnc\) and then move the file "UltraVNC.ini" and then start the "service". From the error it looks like the error related to the "file" resource.