added apt::custom_sources_template to deploy custom sources.list.d/xyz.list from templates
This commit is contained in:
parent
5972a35566
commit
e95ac6b120
2 changed files with 19 additions and 2 deletions
6
README
6
README
|
@ -146,6 +146,12 @@ upgrade_package { "perl":
|
||||||
"perl-modules":
|
"perl-modules":
|
||||||
}
|
}
|
||||||
|
|
||||||
|
apt::custom_sources_template
|
||||||
|
----------------------------
|
||||||
|
Deploys custom sources in /etc/apt/sources.list.d, i.e.
|
||||||
|
|
||||||
|
apt::custom_sources_template { "site-apt/my-repository.list.erb": sources_file => "my-repository.list" }
|
||||||
|
|
||||||
TODO
|
TODO
|
||||||
====
|
====
|
||||||
|
|
||||||
|
|
|
@ -54,6 +54,17 @@ class apt {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
define custom_sources_template ($sources_file = "") {
|
||||||
|
file { "/etc/apt/sources.list.d/$sources_file":
|
||||||
|
content => template($name),
|
||||||
|
require => Exec[assert_lsbdistcodename];
|
||||||
|
}
|
||||||
|
exec { "/usr/bin/apt-get update":
|
||||||
|
subscribe => File["/etc/apt/sources.list.d/$sources_file"],
|
||||||
|
refreshonly => true,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
case $custom_preferences {
|
case $custom_preferences {
|
||||||
'': {
|
'': {
|
||||||
include default_preferences
|
include default_preferences
|
||||||
|
|
Loading…
Reference in a new issue