Quantcast
Channel: User kaiser - Server Fault
Viewing all articles
Browse latest Browse all 26

Puppet exec command with variable not executed

$
0
0

I have a very simple Puppet (sub)module that should use Git to clone a repository from a remote location:

class wppuppet::git(  $location = '/var/www/wp') {  file { $location:    ensure => 'directory',    mode   => '0755',  }  exec { 'git-wp':    command => 'git clone https://github.com/WordPress/WordPress ${location}',    require => Package['git'],  }  Package['git']  -> File[ $location ]  -> Exec['git-wp']}

For some reason it constantly fails with the following error:

Error: git clone https://github.com/WordPress/WordPress ${location} returned 128 instead of one of [0]Error: /Stage[main]/Wppuppet::Git/Exec[git-wp]/returns: change from notrun to 0 failed: git clone https://github.com/WordPress/WordPress ${location} returned 128 instead one of [0]

I tried it with ${location} as well as with $location, but the result stays the same.


Viewing all articles
Browse latest Browse all 26

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>