Skip to content

Commit

Permalink
Merge pull request #427 from mhaskel/required_packages
Browse files Browse the repository at this point in the history
RFC - Remove required packages
  • Loading branch information
daenney committed Feb 20, 2015
2 parents 463a61c + bb3a1f0 commit ab92827
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 24 deletions.
13 changes: 0 additions & 13 deletions manifests/source.pp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
$repos = 'main',
$include_src = true,
$include_deb = true,
$required_packages = false,
$key = undef,
$key_server = 'keyserver.ubuntu.com',
$key_content = undef,
Expand Down Expand Up @@ -60,18 +59,6 @@
}
}

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}":
Expand Down
1 change: 0 additions & 1 deletion spec/classes/apt_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@
'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',
Expand Down
10 changes: 0 additions & 10 deletions spec/defines/source_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
'release' => 'sid',
'repos' => 'testing',
'include_src' => false,
'required_packages' => 'vim',
'key' => GPG_KEY_ID,
'key_server' => 'pgp.mit.edu',
'key_content' => 'GPG key content',
Expand All @@ -78,15 +77,6 @@
})
}

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,
Expand Down

0 comments on commit ab92827

Please sign in to comment.