Skip to content

Commit fa9cbc4

Browse files
committed
Remove ensure-packages
1 parent 8881c43 commit fa9cbc4

File tree

2 files changed

+27
-27
lines changed

2 files changed

+27
-27
lines changed

manifests/install.pp

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@
2525
}
2626

2727
if $python::manage_python_package {
28-
ensure_packages (['python'],
28+
package { 'python':
2929
ensure => $python::ensure,
3030
name => $python,
31-
)
31+
}
3232
}
3333

3434
if $python::manage_venv_package {
@@ -47,17 +47,17 @@
4747
case $python::provider {
4848
'pip': {
4949
if $python::manage_pip_package {
50-
ensure_packages (['pip'],
50+
package { 'pip':
5151
ensure => $python::pip,
5252
require => Package['python'],
53-
)
53+
}
5454
}
5555

5656
if $pythondev {
57-
ensure_packages (['python-dev'],
57+
package { 'python-dev':
5858
ensure => $python::dev,
5959
name => $pythondev,
60-
)
60+
}
6161
}
6262

6363
# Respect the $python::pip setting
@@ -180,28 +180,28 @@
180180
}
181181

182182
if $pythondev {
183-
ensure_packages (['python-dev'],
184-
ensure => $python::dev,
185-
name => $pythondev,
186-
alias => $pythondev,
183+
package { 'python-dev':
184+
ensure => $python::dev,
185+
name => $pythondev,
186+
alias => $pythondev,
187187
provider => 'yum',
188-
)
188+
}
189189
}
190190
}
191191
default: {
192192
if $python::manage_pip_package {
193-
ensure_packages (['pip'],
193+
package { 'pip':
194194
ensure => $python::pip,
195195
require => Package['python'],
196-
)
196+
}
197197
}
198198

199199
if $pythondev {
200-
ensure_packages (['python-dev'],
200+
package { 'python-dev':
201201
ensure => $python::dev,
202202
name => $pythondev,
203203
alias => $pythondev,
204-
)
204+
}
205205
}
206206
}
207207
}

spec/classes/python_spec.rb

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,15 @@
5050
{
5151
manage_pip_package: true,
5252
manage_venv_package: true,
53-
pip: 'installed',
54-
venv: 'installed'
53+
pip: 'present',
54+
venv: 'present'
5555
}
5656
end
5757

5858
it { is_expected.to compile.with_all_deps }
59-
it { is_expected.to contain_package('pip').with(ensure: 'installed') }
59+
it { is_expected.to contain_package('pip').with(ensure: 'present') }
6060

61-
it { is_expected.to contain_package('python-venv').with(ensure: 'installed') } unless facts[:os]['name'] == 'CentOS'
61+
it { is_expected.to contain_package('python-venv').with(ensure: 'present') } unless facts[:os]['name'] == 'CentOS'
6262
end
6363

6464
case facts[:os]['family']
@@ -86,10 +86,10 @@
8686
# rubocop:disable RSpec/RepeatedExampleGroupDescription
8787
describe 'with python::dev' do
8888
context 'true' do
89-
let(:params) { { dev: 'installed' } }
89+
let(:params) { { dev: 'present' } }
9090

9191
it { is_expected.to compile.with_all_deps }
92-
it { is_expected.to contain_package('python-dev').with_ensure('installed') }
92+
it { is_expected.to contain_package('python-dev').with_ensure('present') }
9393
end
9494

9595
context 'empty/default' do
@@ -233,9 +233,9 @@
233233

234234
describe 'with python::dev' do
235235
context 'true' do
236-
let(:params) { { dev: 'installed' } }
236+
let(:params) { { dev: 'present' } }
237237

238-
it { is_expected.to contain_package('python-dev').with_ensure('installed') }
238+
it { is_expected.to contain_package('python-dev').with_ensure('present') }
239239
end
240240

241241
context 'default/empty' do
@@ -417,9 +417,9 @@
417417

418418
describe 'with python::dev' do
419419
context 'true' do
420-
let(:params) { { dev: 'installed' } }
420+
let(:params) { { dev: 'present' } }
421421

422-
it { is_expected.to contain_package('python-dev').with_ensure('installed') }
422+
it { is_expected.to contain_package('python-dev').with_ensure('present') }
423423
end
424424

425425
context 'empty/default' do
@@ -467,9 +467,9 @@
467467

468468
describe 'with python::dev' do
469469
context 'true' do
470-
let(:params) { { dev: 'installed' } }
470+
let(:params) { { dev: 'present' } }
471471

472-
it { is_expected.to contain_package('python-dev').with_ensure('installed') }
472+
it { is_expected.to contain_package('python-dev').with_ensure('present') }
473473
end
474474

475475
context 'default/empty' do

0 commit comments

Comments
 (0)