From: Josh Farwell Date: Wed, 3 Jun 2015 19:35:29 +0000 (-0700) Subject: Yumrepo bug fix and added "require" for package X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F88%2F88%2F3;p=puppet%2Fmodules%2Fmailman3.git Yumrepo bug fix and added "require" for package Yumrepo statement was creating a file without "name" defined, fixed. Added "require" statement for the mailman3 package to prevent yum errors as a result of not having the repo installed, updated rspec tests. Fixed formatting. Change-Id: I38cb0787bdda4a5d99f5d6cda2d9c107429eb243 Signed-off-by: Josh Farwell --- diff --git a/manifests/install.pp b/manifests/install.pp index 88b64d6..034042a 100644 --- a/manifests/install.pp +++ b/manifests/install.pp @@ -46,19 +46,22 @@ class mailman3::install ( # Install mailman3 yum repo - EL7 only at this time yumrepo { 'fedorapeople-mailman3': - ensure => present, - name => 'fedorapeople-mailman3', - baseurl => 'https://repos.fedorapeople.org/repos/abompard/hyperkitty/el-7/x86_64/', - gpgcheck => 'no', - enabled => true, + ensure => present, + name => 'fedorapeople-mailman3', + descr => 'FedoraPeople Mailman 3 Repo', + baseurl => 'https://repos.fedorapeople.org/repos/abompard/hyperkitty/el-7/x86_64/', + gpgcheck => 'no', + enabled => true, } # Install mailman core if we want to # TODO: Split out into subclasses for each application component if ($install_mailman) { package { 'mailman3': - ensure => $mailman_version, + ensure => $mailman_version, + require => Yumrepo['fedorapeople-mailman3'], } + } } diff --git a/spec/classes/install_spec.rb b/spec/classes/install_spec.rb index 102af91..bd5dc5c 100644 --- a/spec/classes/install_spec.rb +++ b/spec/classes/install_spec.rb @@ -48,7 +48,7 @@ describe 'mailman3::install', :type => :class do it 'should have mailman if install_mailman is true' do params.merge!({'install_mailman' => true}) - should contain_package('mailman3') + should contain_package('mailman3').that_requires('Yumrepo[fedorapeople-mailman3]') end end