diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2021-12-20 12:39:15 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2021-12-20 12:39:15 +0100 |
commit | f56d2d7888be1a27d7ef05d850afdc4e9dbb464a (patch) | |
tree | e193c75cbdb40c5290906d97b3ac8966a1099a47 /code/environments/production/modules/apt/manifests/conf.pp | |
download | puppet.SGM-f56d2d7888be1a27d7ef05d850afdc4e9dbb464a.tar.gz puppet.SGM-f56d2d7888be1a27d7ef05d850afdc4e9dbb464a.tar.bz2 puppet.SGM-f56d2d7888be1a27d7ef05d850afdc4e9dbb464a.zip |
initial draft of a minimal puppet config template
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, + } +} |