Ask Your Question
0

"'Failed to apply catalog: Parameter creates failed on Exec[create repo_dir]: creates must be a fully qualified path at /opt/puppetlabs/puppet/modules/pe_repo/manifests/init.pp:30"

asked 2015-09-21 11:15:03 -0500

michaelokoluko gravatar image

updated 2015-09-21 12:08:04 -0500

ramindk gravatar image

Following on from the above issue I have now amended my code and run a puppet parser validation on the init.pp and no syntax errors...

however when I run a puppet agent --noop -t on the windows node I get the below error

Failed to apply catalog: Parameter creates failed on Exec[create repo_dir]: creates must
 be a fully qualified path at /opt/puppetlabs/puppet/modules/pe_repo/manifests/init.pp:30

Below is my current init.pp manifest - any ideas where I have gone off tangent - I believe the attributes and parameters may not be in the right order

class downloadScript {

  file { "c:\\downdownload.ps1":
    ensure => present,
    #source => "puppet:///modules/downloadScript/download.ps1",
    source  => "c:\\downdownload.ps1"
  }

  exec {"c:\\download.ps1":
    # if you want this to only run under certain conditions, use the 'unless' or 'onlyif'
    creates     => "puppet:///modules/downloadScript/download.ps1",
    require     => File["c:\\downdownload.ps1"],
    refreshonly => true,
    notify      => "puppet:///modules/downloadScript/download.ps1",
    logoutput   => true,
    provider    => powershell,
    subscribe   => 'C:/WINDOWS/Sytems32/WindowsPowerShell/v1.0/powershell.exe'
    }
}
edit retag flag offensive close merge delete

Comments

Don't make a new question, update your original question here. Also use the formatting tool. I fixed your question once, it's up to you to maintain that.

ramindk gravatar imageramindk ( 2015-09-21 14:54:38 -0500 )edit

If you're happy with the solution, just mark the answer solved by clicking the check mark under the answer.

ramindk gravatar imageramindk ( 2015-09-30 12:48:43 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-09-21 12:11:03 -0500

ramindk gravatar image
creates     => "puppet:///modules/downloadScript/download.ps1",

creates should point to the file on the filesystem that is created when the script is run. Or if no file is created, there is no need to set it. You're setting it a reference on the Puppet master.

http://docs.puppetlabs.com/references...

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-09-21 11:15:03 -0500

Seen: 561 times

Last updated: Sep 21 '15