diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2022-09-16 23:04:08 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2022-09-16 23:04:08 +0200 |
commit | 01af1d05a2c3d95101921ca8cec9a03d9eea5150 (patch) | |
tree | cf3807d3eb4ae25e192271fe359ffd60c3fa050f /code/environments/production/modules/apt/manifests/conf.pp | |
download | puppet.LW-01af1d05a2c3d95101921ca8cec9a03d9eea5150.tar.gz puppet.LW-01af1d05a2c3d95101921ca8cec9a03d9eea5150.tar.bz2 puppet.LW-01af1d05a2c3d95101921ca8cec9a03d9eea5150.zip |
initial puppet.LW configuration
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, + } +} |