Skip to content

Instantly share code, notes, and snippets.

@norrs
Created March 2, 2012 23:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save norrs/1962562 to your computer and use it in GitHub Desktop.
Save norrs/1962562 to your computer and use it in GitHub Desktop.
stage { 'first' : before => Stage['main'] }
stage { 'bootstrap' : before => Stage['first'] }
stage { 'last' : require => Stage['main'] }
class bootstrap($release="squeeze") {
apt::source { "debian_${release}":
location => "http://debian.samfundet.no/debian/",
release => $release,
repos => "main contrib non-free",
required_packages => "debian-keyring debian-archive-keyring",
key => "55BE302B",
key_server => "subkeys.pgp.net",
pin => "600"
}
apt::source { "debian_backports":
location => "http://backports.debian.org/debian-backports/",
release => "${release}-backports",
repos => "main contrib non-free",
required_packages => "debian-ports-archive-keyring",
key => false,
}
#packages => ["puppet", "puppet-common", "puppet-testsuite", "puppetmaster", "puppetmaster-common", "puppetmaster-passenger", "vim-puppet"],
apt::pin { "debian_backports":
packages => ['puppet ', 'puppet-common ', 'puppet-testsuite ', 'puppetmaster ', 'puppetmaster-common ', 'puppetmaster-passenger ', 'vim-puppet '],
priority => 700,
}
#apt::pin { "debian_backports": packages => 'puppet', priority => 700 }
#apt::pin { "debian_backports": packages => 'puppet-common', priority => 700 }
#apt::pin { "debian_backports": packages => 'puppet-puppet-testsuite', priority => 700 }
#apt::pin { "debian_backports": packages => 'puppetmaster', priority => 700 }
#apt::pin { "debian_backports": packages => 'puppetmaster-common', priority => 700 }
#apt::pin { "debian_backports": packages => 'puppetmaster-passenger', priority => 700 }
#apt::pin { "debian_backports": packages => 'vim-puppet', priority => 700 }
}
class base {
filebucket { 'main':
server => 'xxxx.no',
path => false,
# Path set to false for remote filebuckets, due to a known bug.
}
File { backup => main } #Sets filebuckets backup for all files
# Bootstrap helper class to run specific defines
# dns / hosts må inn før ntp
class {
'sshd': stage => first;
'ntp': stage => first;
'apt': stage=> bootstrap;
'apt::release': release_id => 'squeeze', stage=> bootstrap;
'bootstrap': stage=> bootstrap;
}
#################
possible to make class which include's base to set $release?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment