Skip to content

Commit fbc5753

Browse files
committed
Add EPEL dependency
Fixed voxpupuli#196
1 parent 9ce158c commit fbc5753

File tree

4 files changed

+16
-0
lines changed

4 files changed

+16
-0
lines changed

Modulefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ project_page 'https://github.com/stankevich/puppet-python'
99

1010
## Add dependencies, if any:
1111
dependency 'puppetlabs/stdlib', '>= 4.0.0'
12+
dependency 'stahnma/epel', '>= 1.0.1'

manifests/install.pp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,16 @@
5656
package { "python==${python::version}": ensure => latest, provider => pip }
5757
}
5858
default: {
59+
if $::osfamily == 'RedHat' {
60+
if $pip_ensure == present {
61+
include 'epel'
62+
Class['epel'] -> Package[$pip]
63+
}
64+
if ($venv_ensure == present) and ($::operatingsystemrelease =~ /^6/) {
65+
include 'epel'
66+
Class['epel'] -> Package['python-virtualenv']
67+
}
68+
}
5969
package { 'python-virtualenv': ensure => $venv_ensure }
6070
package { $pip: ensure => $pip_ensure }
6171
package { $pythondev: ensure => $dev_ensure }

metadata.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@
4444
{
4545
"name": "puppetlabs/stdlib",
4646
"version_requirement": ">= 4.0.0"
47+
},
48+
{
49+
"name": "stahnma/epel",
50+
"version_requirement": ">= 1.0.1"
4751
}
4852
]
4953
}

spec/spec_helper_acceptance.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
copy_module_to(host, :source => proj_root, :module_name => 'python')
2828
shell("/bin/touch #{default['puppetpath']}/hiera.yaml")
2929
on host, puppet('module install puppetlabs-stdlib'), { :acceptable_exit_codes => [0,1] }
30+
on host, puppet('module install stahnma-epel'), { :acceptable_exit_codes => [0,1] }
3031
end
3132
end
3233
end

0 commit comments

Comments
 (0)