I'm trying to get Puppet to manage my Debian apt sources.list, however, catalog compilation fails with this error:
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: ::apt::config_files is not a hash or array when accessing it with list at /etc/puppet/environments/production/modules/apt/manifests/setting.pp:45 on node [hostname]
I have no idea where I should provide ::apt::config_files or what I'd need to put in it. My manifests contain the following:
# site.pp
node <hostname> {
include roles::myrole
}
# myrole.pp
class roles::myrole.pp {
include profiles::apt
}
# apt.pp
class profiles::apt {
# Get our apt sources out of Hiera.
$hiera_apt_sources = hiera_hash(apt_sources)
# Create our apt sources.
create_resources(apt::source, $hiera_apt_sources)
}
# hieradata (yaml)
apt_sources:
'debian_stable':
location: 'ftp.be.debian.org/debian/'
release: 'stable'
repos: 'main contrib non-free'
'debian_security':
location: 'security.debian.org'
release: 'updates'
repos: 'main contrib non-free'
Am I missing something obvious here? I've looked through the documentation at the forge and this Puppetlabs post and some other hits on Google.
I also tried to include apt
in apt.pp, but to no avail.