Hello, newcomer in Puppet. I am trying to fiddle with a box that i created using vagrant.
I have used the ubuntu/xenial64 box and installed puppet-agent via the
wget https://apt.puppetlabs.com/puppetlabs-release-pc1-wheezy.deb
dpkg -i puppetlabs-release-pc1-wheezy.deb
apt-get update && apt-get install puppet-agent
now i find myself unable to run this manifest to install a module:
Puppet script taken from this stackoverflow: http://stackoverflow.com/questions/16774980/can-i-install-puppet-modules-through-puppet-manifest
$module_vcsrepo = 'puppetlabs-vcsrepo'
exec { 'puppet_module_vcsrepo':
command => "puppet module install ${module_vcsrepo}",
unless => "puppet module list | grep ${module_vcsrepo}",
path => ['/home/ubuntu/','/bin', '/opt/puppetlabs/bin']
}
Puppet script console output
Notice: Compiled catalog for ubuntu-xenial.localdomain in environment production in 0.18 seconds
Notice: /Stage[main]/Main/Exec[puppet_module_vcsrepo]/returns: Error: Could not initialize global default settings: couldn't find HOME environment -- expanding `~'
Error: puppet module install puppetlabs-vcsrepo returned 1 instead of one of [0]
Error: /Stage[main]/Main/Exec[puppet_module_vcsrepo]/returns: change from notrun to 0 failed: puppet module install puppetlabs-vcsrepo returned 1 instead of one of [0]
Notice: Applied catalog in 1.89 seconds
I have checked my HOME variable, it is set to `/home/ubuntu`
↧