From: Morgan Haskel Date: Fri, 20 Feb 2015 00:41:27 +0000 (-0800) Subject: Merge pull request #426 from puppetlabs/daenney/fix-missing-param-and-naming X-Git-Tag: 2.0.0~43 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=59c362a2c13619278977087521c81aa20169cbca;hp=3e407d70e09d1271958b82fe27a4e3a26915f707;p=puppet-modules%2Fpuppetlabs-apt.git Merge pull request #426 from puppetlabs/daenney/fix-missing-param-and-naming apt::params: Add two missing entries, use them. --- diff --git a/manifests/source.pp b/manifests/source.pp index 3e9414f..b06d610 100644 --- a/manifests/source.pp +++ b/manifests/source.pp @@ -9,7 +9,6 @@ define apt::source( $repos = 'main', $include_src = true, $include_deb = true, - $required_packages = false, $key = undef, $key_server = 'keyserver.ubuntu.com', $key_content = undef, @@ -60,18 +59,6 @@ define apt::source( } } - if ($required_packages != false) and ($ensure == 'present') { - exec { "Required packages: '${required_packages}' for ${name}": - command => "${provider} -y install ${required_packages}", - logoutput => 'on_failure', - refreshonly => true, - tries => 3, - try_sleep => 1, - subscribe => File["${name}.list"], - before => Exec['apt_update'], - } - } - # We do not want to remove keys when the source is absent. if $key and ($ensure == 'present') { apt::key { "Add key: ${key} from Apt::Source ${title}": diff --git a/spec/classes/apt_spec.rb b/spec/classes/apt_spec.rb index 5095904..b92f7dd 100644 --- a/spec/classes/apt_spec.rb +++ b/spec/classes/apt_spec.rb @@ -96,7 +96,6 @@ describe 'apt', :type => :class do 'location' => 'http://debian.mirror.iweb.ca/debian/', 'release' => 'unstable', 'repos' => 'main contrib non-free', - 'required_packages' => 'debian-keyring debian-archive-keyring', 'key' => '55BE302B', 'key_server' => 'subkeys.pgp.net', 'pin' => '-10', diff --git a/spec/defines/source_spec.rb b/spec/defines/source_spec.rb index 684a6f0..7a1cac3 100644 --- a/spec/defines/source_spec.rb +++ b/spec/defines/source_spec.rb @@ -51,7 +51,6 @@ describe 'apt::source', :type => :define do 'release' => 'sid', 'repos' => 'testing', 'include_src' => false, - 'required_packages' => 'vim', 'key' => GPG_KEY_ID, 'key_server' => 'pgp.mit.edu', 'key_content' => 'GPG key content', @@ -78,15 +77,6 @@ describe 'apt::source', :type => :define do }) } - it { is_expected.to contain_exec("Required packages: 'vim' for my_source").that_comes_before('Exec[apt_update]').that_subscribes_to('File[my_source.list]').with({ - 'command' => '/usr/bin/apt-get -y install vim', - 'logoutput' => 'on_failure', - 'refreshonly' => true, - 'tries' => '3', - 'try_sleep' => '1', - }) - } - it { is_expected.to contain_apt__key("Add key: #{GPG_KEY_ID} from Apt::Source my_source").that_comes_before('File[my_source.list]').with({ 'ensure' => 'present', 'key' => GPG_KEY_ID,