diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2018-09-16 22:55:58 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2018-09-16 22:55:58 +0200 |
commit | 9513b93a992470e21e387db1451fa4fd21ffc5d6 (patch) | |
tree | 24b584e9a66ce00f053748ab938eecc8d91110ab /code/environments/production/modules/apt/manifests/conf.pp | |
parent | b9c90f087cb54a0b8be222dbdcd88c8a73ef4f57 (diff) | |
download | puppet.DEV-9513b93a992470e21e387db1451fa4fd21ffc5d6.tar.gz puppet.DEV-9513b93a992470e21e387db1451fa4fd21ffc5d6.tar.bz2 puppet.DEV-9513b93a992470e21e387db1451fa4fd21ffc5d6.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.pp | 22 |
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, + } +} |