I'm trying to install puppetlabs apt module inside a vagrant guest, but I'm hitting the following error:
==> default: Running provisioner: puppet...
==> default: Running Puppet with default.pp...
==> default: stdin: is not a tty
==> default: Info: Loading facts in /tmp/modules/puppetlabs-stdlib/lib/facter/pe_version.rb
==> default: Info: Loading facts in /tmp/modules/puppetlabs-stdlib/lib/facter/puppet_vardir.rb
==> default: Info: Loading facts in /tmp/modules/puppetlabs-stdlib/lib/facter/facter_dot_d.rb
==> default: Info: Loading facts in /tmp/modules/puppetlabs-stdlib/lib/facter/root_home.rb
==> default: Info: Loading facts in /tmp/modules/puppetlabs-apt/lib/facter/apt_package_updates.rb
==> default: Info: Loading facts in /tmp/modules/puppetlabs-apt/lib/facter/apt_update_last_success.rb
==> default: Info: Loading facts in /tmp/modules/puppetlabs-apt/lib/facter/apt_security_updates.rb
==> default: Info: Loading facts in /tmp/modules/puppetlabs-apt/lib/facter/apt_updates.rb
==> default: Error: Could not find class apt for vagrant-ubuntu-trusty-64.home on node vagrant-ubuntu-trusty-64.home
My Vagrantfile:
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.provision "shell", inline: "apt-get install -y ruby1.9.1-dev git"
config.vm.provision "shell", inline: "gem install librarian-puppet -v 1.0.0"
config.vm.provision "shell", inline: "cp /vagrant/Puppetfile /tmp/"
config.vm.provision "shell", inline: "cd /tmp/ && librarian-puppet install --verbose"
config.vm.provision "puppet" do |puppet|
puppet.temp_dir = "/tmp"
puppet.options = ['--modulepath=/tmp/modules', '--verbose', '--debug']
end
end
My Puppetfile:
forge "https://forge.puppetlabs.com"
mod 'puppetlabs-apt',
:git => "git://github.com/puppetlabs/puppetlabs-apt.git"
mod 'puppetlabs-stdlib',
:git => "git://github.com/puppetlabs/puppetlabs-stdlib.git"
My manifests/default.pp:
include apt
I'm inexperienced with puppet so any pointers will be appreciated.
librarian-puppet is putting the modules in /tmp/modules/puppetlabs-apt instead of /tmp/modules/apt
You need to update librarian-puppet to 1.1.3+ because 1.0.0 doesn't use the owner-module syntax, it was owner/module before.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.