From dc107c2cac6a515751b5163e2a4a855504f9a2f4 Mon Sep 17 00:00:00 2001 From: Kienan Stewart Date: Sun, 24 Jun 2018 12:43:09 -0400 Subject: [PATCH] Re-factor source for laternc into it's own class --- manifests/bureau.pp | 23 +---------------------- manifests/source.pp | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+), 22 deletions(-) diff --git a/manifests/bureau.pp b/manifests/bureau.pp index 25ad7d0..ef8066c 100644 --- a/manifests/bureau.pp +++ b/manifests/bureau.pp @@ -41,29 +41,8 @@ class alternc::bureau ( content => template('alternc/alternc.response.erb'), } if ($manage_sources) { - # Upstream hasn't released anything into the stretch archives - # or later. 2018.06.08 - if ($facts['os']['lsb']['majdistrelease'] >= '8') { - $release = 'jessie' - } - else { - $release = $facts['os']['lsb']['distcodename'] - } - apt::source { 'alternc': - location => 'http://debian.alternc.org', - release => $release, - key => { - id => '54E9B3EC75A6375C4670104BA4AFB8B58971F6F2', - source => 'https://debian.alternc.org/key.txt', - }, - repos => 'main', - } - Apt::Source['alternc'] - -> Package['alternc'] - Apt::Source['alternc'] - ~> Class[Apt::Update] + include alternc::source } - package { 'acl': ensure => present, } diff --git a/manifests/source.pp b/manifests/source.pp index e69de29..643134a 100644 --- a/manifests/source.pp +++ b/manifests/source.pp @@ -0,0 +1,23 @@ +class alternc::source { + # Upstream hasn't released anything into the stretch archives + # or later. 2018.06.08 + if ($facts['os']['lsb']['majdistrelease'] >= '8') { + $release = 'jessie' + } + else { + $release = $facts['os']['lsb']['distcodename'] + } + apt::source { 'alternc': + location => 'http://debian.alternc.org', + release => $release, + key => { + id => '54E9B3EC75A6375C4670104BA4AFB8B58971F6F2', + source => 'https://debian.alternc.org/key.txt', + }, + repos => 'main', + } + Apt::Source['alternc'] + -> Package['alternc'] + Apt::Source['alternc'] + ~> Class[Apt::Update] +}