Merge commit '27d5808299045ebd6f428e7d8131d11d9ab37712'.
One more painless merge commit. Conflicts: manifests/init.pp
This commit is contained in:
commit
f22861e820
6 changed files with 39 additions and 19 deletions
|
@ -1,13 +1,13 @@
|
|||
define apt::apt_conf_snippet(
|
||||
define apt::apt_conf(
|
||||
$ensure = 'present',
|
||||
$source = '',
|
||||
$content = undef
|
||||
){
|
||||
if $source == '' and $content == undef {
|
||||
fail("One of \$source or \$content must be specified for apt_conf_snippet ${name}")
|
||||
fail("One of \$source or \$content must be specified for apt_conf ${name}")
|
||||
}
|
||||
if $source != '' and $content != undef {
|
||||
fail("Only one of \$source or \$content must specified for apt_conf_snippet ${name}")
|
||||
fail("Only one of \$source or \$content must specified for apt_conf ${name}")
|
||||
}
|
||||
|
||||
file { "/etc/apt/apt.conf.d/${name}":
|
|
@ -1,7 +0,0 @@
|
|||
define apt::custom_sources_template ($sources_file = "") {
|
||||
file { "/etc/apt/sources.list.d/$sources_file":
|
||||
content => template($name),
|
||||
notify => Exec['refresh_apt']
|
||||
}
|
||||
}
|
||||
|
|
@ -5,8 +5,6 @@
|
|||
|
||||
class apt {
|
||||
|
||||
import "custom_sources.pp"
|
||||
|
||||
# See README
|
||||
$real_apt_clean = $apt_clean ? {
|
||||
'' => 'auto',
|
||||
|
@ -86,8 +84,7 @@ class apt {
|
|||
|
||||
config_file {
|
||||
# include main, security and backports
|
||||
# additional sources should be included via the custom_sources_template
|
||||
# define
|
||||
# additional sources should be included via the apt::sources_list define
|
||||
"/etc/apt/sources.list":
|
||||
content => $custom_sources_list ? {
|
||||
'' => template( "apt/$operatingsystem/sources.list.erb"),
|
||||
|
@ -96,13 +93,13 @@ class apt {
|
|||
require => Package['lsb'];
|
||||
}
|
||||
|
||||
apt_conf_snippet{ "02show_upgraded":
|
||||
apt_conf { "02show_upgraded":
|
||||
source => ["puppet:///modules/site-apt/${fqdn}/02show_upgraded",
|
||||
"puppet:///modules/site-apt/02show_upgraded",
|
||||
"puppet:///modules/apt/02show_upgraded"]
|
||||
}
|
||||
|
||||
apt_conf_snippet{ "03clean":
|
||||
apt_conf { "03clean":
|
||||
source => ["puppet:///modules/site-apt/${fqdn}/03clean",
|
||||
"puppet:///modules/site-apt/03clean",
|
||||
"puppet:///modules/apt/03clean"]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
class apt::proxy-client {
|
||||
class apt::proxy_client {
|
||||
|
||||
$real_apt_proxy = $apt_proxy ? {
|
||||
"" => "localhost",
|
||||
|
@ -10,7 +10,7 @@ class apt::proxy-client {
|
|||
default => $apt_proxy_port
|
||||
}
|
||||
|
||||
apt_conf_snippet { "20proxy":
|
||||
apt_conf { "20proxy":
|
||||
content => template("apt/20proxy.erb"),
|
||||
}
|
||||
}
|
30
manifests/sources_list.pp
Normal file
30
manifests/sources_list.pp
Normal file
|
@ -0,0 +1,30 @@
|
|||
define apt::sources_list (
|
||||
$ensure = 'present',
|
||||
$source = '',
|
||||
$content = undef
|
||||
) {
|
||||
if $source == '' and $content == undef {
|
||||
fail("One of \$source or \$content must be specified for apt_sources_snippet ${name}")
|
||||
}
|
||||
if $source != '' and $content != undef {
|
||||
fail("Only one of \$source or \$content must specified for apt_sources_snippet ${name}")
|
||||
}
|
||||
|
||||
file { "/etc/apt/sources.list.d/${name}":
|
||||
ensure => $ensure,
|
||||
notify => Exec['refresh_apt'],
|
||||
owner => root, group => 0, mode => 0600;
|
||||
}
|
||||
|
||||
if $source {
|
||||
File["/etc/apt/sources.list.d/${name}"] {
|
||||
source => $source,
|
||||
}
|
||||
}
|
||||
else {
|
||||
File["/etc/apt/sources.list.d/${name}"] {
|
||||
content => $content,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -4,7 +4,7 @@ class apt::unattended_upgrades {
|
|||
require => undef,
|
||||
}
|
||||
|
||||
apt_conf_snippet { "50unattended-upgrades":
|
||||
apt_conf { "50unattended-upgrades":
|
||||
source => ["puppet:///modules/site-apt/50unattended-upgrades",
|
||||
"puppet:///modules/apt/50unattended-upgrades" ],
|
||||
|
||||
|
|
Loading…
Reference in a new issue