Dominykas Mostauskis
Dominykas Mostauskis

Reputation: 8125

How to use puppetlabs/apt module?

I am developing puppet manifests for provisioning a VM through Vagrant. I am also new to puppet. While trying to use puppetlabs/apt module, I am encountering problems:

# manifests/default.pp (with commented lines removed)
import "stdlib"
import "apt"

class { 'apt':
  always_apt_update    => false,
  disable_keys         => undef,
  proxy_host           => false,
  proxy_port           => '8080',
  purge_sources_list   => false,
  purge_sources_list_d => false,
  purge_preferences_d  => false
}
apt::release { "sid":}

This is the error message:

Puppet::Parser::AST::Resource failed with error ArgumentError:
Invalid resource type apt::release at /tmp/vagrant-puppet/manifests/default.pp:18
on node vmas1.dokeda.lt

I have been reading puppet docs; however, it hasn't helped. Could someone explain to me how to properly use this module?

Upvotes: 3

Views: 2443

Answers (2)

Arioch
Arioch

Reputation: 35

Also be sure not to use "import" but instead use "include". Import is deprecated in more recent versions of puppet.

Upvotes: 1

Dominic Cleal
Dominic Cleal

Reputation: 3205

I think the README incorrectly implies that apt::release is a define or type, when in fact the source code shows it's a class.

Instead, try calling it like this:

class { 'apt::release':
  release_id => 'sid',
}

Upvotes: 1

Related Questions