summaryrefslogtreecommitdiff
path: root/code/environments/production/modules/apt/manifests/conf.pp
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2018-09-16 22:59:26 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2018-09-16 22:59:26 +0200
commit3f1bbf87bbcc3daa15cd7391b2949b5bf742781b (patch)
treee7c058c84b2d8aebb84db73bb00429cdf284fc13 /code/environments/production/modules/apt/manifests/conf.pp
parent852be73c92e8a950dd0c3514cadd67058717b212 (diff)
downloadpuppet.FWSECK-3f1bbf87bbcc3daa15cd7391b2949b5bf742781b.tar.gz
puppet.FWSECK-3f1bbf87bbcc3daa15cd7391b2949b5bf742781b.tar.bz2
puppet.FWSECK-3f1bbf87bbcc3daa15cd7391b2949b5bf742781b.zip
modules/apt: Ship puppetlabs-apt module v4.5.1.
Diffstat (limited to 'code/environments/production/modules/apt/manifests/conf.pp')
-rw-r--r--code/environments/production/modules/apt/manifests/conf.pp22
1 files changed, 22 insertions, 0 deletions
diff --git a/code/environments/production/modules/apt/manifests/conf.pp b/code/environments/production/modules/apt/manifests/conf.pp
new file mode 100644
index 0000000..b791f85
--- /dev/null
+++ b/code/environments/production/modules/apt/manifests/conf.pp
@@ -0,0 +1,22 @@
+# Defining apt config
+define apt::conf (
+ Optional[String] $content = undef,
+ Enum['present', 'absent'] $ensure = present,
+ Variant[String, Integer] $priority = 50,
+ Optional[Boolean] $notify_update = undef,
+) {
+
+ unless $ensure == 'absent' {
+ unless $content {
+ fail('Need to pass in content parameter')
+ }
+ }
+
+ $confheadertmp = epp('apt/_conf_header.epp')
+ apt::setting { "conf-${name}":
+ ensure => $ensure,
+ priority => $priority,
+ content => "${confheadertmp}${content}",
+ notify_update => $notify_update,
+ }
+}