Skip to content

Commit 6604937

Browse files
committed
Using stdlib ensure_packages
1 parent 689c1a2 commit 6604937

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

Modulefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@ author 'Tracy Web Technologies'
55
summary 'Install pip using get-pip.py script'
66
description 'Downloads get-pip.py and run it in order to install pip.'
77
project_page 'https://github.com/TracyWebTech/puppet-pip'
8+
9+
dependency 'puppetlabs/stdlib', '>= 3.2.1'

manifests/init.pp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11

22
class pip {
3-
if ! defined(Package['curl']) {
4-
package { 'curl': }
5-
}
3+
ensure_packages(['curl'])
64

75
$get_pip_url = 'https://raw.github.com/pypa/pip/1.5.4/contrib/get-pip.py'
86

97
exec { 'install-pip':
108
command => "curl $get_pip_url | python",
11-
path => ['/usr/bin', '/usr/local/bin'],
9+
path => ['/usr/bin', '/usr/local/bin', '/bin/'],
1210
unless => 'which pip',
11+
require => Package['curl'],
1312
}
1413
}

0 commit comments

Comments
 (0)