From 3f1bbf87bbcc3daa15cd7391b2949b5bf742781b Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Sun, 16 Sep 2018 22:59:26 +0200 Subject: modules/apt: Ship puppetlabs-apt module v4.5.1. --- .../production/modules/apt/manifests/conf.pp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 code/environments/production/modules/apt/manifests/conf.pp (limited to 'code/environments/production/modules/apt/manifests/conf.pp') 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, + } +} -- cgit v1.2.3