Created
April 1, 2014 17:41
-
-
Save adamcrews/9919172 to your computer and use it in GitHub Desktop.
sample apt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node 'node1.my.vm' { | |
class { '::profile::apt': | |
unstable => true, | |
} | |
} | |
node 'vagrant.vm' { | |
class { '::profile::apt': | |
unstable => false, | |
} | |
} | |
class profile::apt ( | |
$unstable = undef, | |
) { | |
# let us use true/false for unstable/stable | |
validate_bool($unstable) | |
# define our real release | |
$release = $unstable ? { | |
true => 'unstable', | |
default => $::lsbdistcodename, | |
} | |
class { '::apt': | |
always_apt_update => false, | |
# Be careful with these options, they will purge | |
# unmanaged repos | |
purge_sources_list => true, | |
purge_sources_list_d => true, | |
} | |
::apt::source { "debian-${release}": | |
location => 'http://http.us.debian.org/debian', | |
release => $release, | |
repos => 'main contrib non-free', | |
required_packages => 'debian-keyring debian-archive-keyring', | |
key => '46925553', | |
key_server => 'subkeys.pgp.net', | |
include_src => true, | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment