Merge pull request #483 from mhaskel/examples
Add missing examples for 'removed' functionality
This commit is contained in:
commit
43ab92c476
5 changed files with 68 additions and 4 deletions
|
@ -1 +1,31 @@
|
||||||
# TODO
|
$location = $::apt::distcodename ? {
|
||||||
|
'squeeze' => 'http://backports.debian.org/debian-backports',
|
||||||
|
'wheezy' => 'http://ftp.debian.org/debian/',
|
||||||
|
default => 'http://archive.ubuntu.com/ubuntu',
|
||||||
|
}
|
||||||
|
|
||||||
|
if $::apt::distid == 'debian' {
|
||||||
|
$repos = 'main contrib non-free'
|
||||||
|
$key = 'A1BD8E9D78F7FE5C3E65D8AF8B48AD6246925553'
|
||||||
|
$release = $::apt::distcodename
|
||||||
|
} else {
|
||||||
|
$repos = 'main universe multiverse restricted'
|
||||||
|
$key = '630239CC130E1A7FD81A27B140976EAF437D05B5'
|
||||||
|
$release = $::apt::distcodename
|
||||||
|
}
|
||||||
|
|
||||||
|
# set up the actual backports
|
||||||
|
apt::pin { 'backports':
|
||||||
|
release => "${release}-backports",
|
||||||
|
priority => 200,
|
||||||
|
}
|
||||||
|
|
||||||
|
apt::source { 'backports':
|
||||||
|
location => $location,
|
||||||
|
release => "${release}-backports",
|
||||||
|
repos => $repos,
|
||||||
|
key => {
|
||||||
|
id => $key,
|
||||||
|
server => 'pgp.mit.edu',
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
5
examples/disable_keys.pp
Normal file
5
examples/disable_keys.pp
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
#Note: This is generally a bad idea. You should not disable verifying repository signatures.
|
||||||
|
apt::conf { 'unauth':
|
||||||
|
priority => 99,
|
||||||
|
content => 'APT::Get::AllowUnauthenticated 1;'
|
||||||
|
}
|
4
examples/fancy_progress.pp
Normal file
4
examples/fancy_progress.pp
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
apt::conf { 'progressbar':
|
||||||
|
priority => 99,
|
||||||
|
content => 'Dpkg::Progress-Fancy "1";',
|
||||||
|
}
|
|
@ -1,2 +1,28 @@
|
||||||
# force.pp
|
#if you need to specify a release
|
||||||
# TODO: Update
|
$rel_string = "-t ${release}"
|
||||||
|
#else
|
||||||
|
$rel_string = ''
|
||||||
|
|
||||||
|
#if you need to specify a version
|
||||||
|
$ensure = $version
|
||||||
|
#else
|
||||||
|
$ensure = installed
|
||||||
|
|
||||||
|
#if overwrite existing cfg files
|
||||||
|
$config_files = '-o Dpkg::Options::="--force-confnew"'
|
||||||
|
#elsif force use of old files
|
||||||
|
$config_files = '-o Dpkg::Options::="--force-confold"'
|
||||||
|
#elsif update only unchanged files
|
||||||
|
$config_files = '-o Dpkg::Options::="--force-confdef"'
|
||||||
|
#else
|
||||||
|
$config_files = ''
|
||||||
|
|
||||||
|
#if install missing configuration files for the package
|
||||||
|
$config_missing = '-o Dpkg::Options::="--force-confmiss"'
|
||||||
|
#else
|
||||||
|
$config_missing = ''
|
||||||
|
|
||||||
|
package { $package:
|
||||||
|
ensure => $ensure,
|
||||||
|
install_options => "${config_files} ${config_missing} ${release_string}",
|
||||||
|
}
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
# TODO
|
|
Loading…
Reference in a new issue