I have noticed the path provided for the "file" resource
"file { 'C:\Program Files\uvnc bvba\UltraVnc':" As puppet assumes the "\" as escape character so puppet was unable to create the required file for me. I have changed the line to "file { 'c:/Program Files/uvnc bvba/UltraVnc/UltraVNC.ini':" On Monday, May 8, 2017 at 12:14:39 PM UTC-7, gangadhar r wrote: > > 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 @ > dir*s*mkdir > - 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 @ > dir*s*mkdir > - 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 @ dir*s*mkdir - 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 @ dir*s*mkdir - 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. > > -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/9af2b4f0-909f-48e2-89fb-f520d12db157%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.