Skip to content

Commit b0cff88

Browse files
author
Simon Tremblay
committed
Add group parameter for python::pip resource
1 parent 9e8c5a1 commit b0cff88

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

manifests/pip.pp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
# [*owner*]
2323
# The owner of the virtualenv being manipulated. Default: root
2424
#
25+
# [*group*]
26+
# The group of the virtualenv being manipulated. Default: root
27+
#
2528
# [*proxy*]
2629
# Proxy server to use for outbound connections. Default: none
2730
#
@@ -63,6 +66,7 @@
6366
$virtualenv = 'system',
6467
$url = false,
6568
$owner = 'root',
69+
$group = 'root',
6670
$proxy = false,
6771
$egg = false,
6872
$editable = false,
@@ -163,6 +167,7 @@
163167
command => "${pip_env} wheel --help > /dev/null 2>&1 && { ${pip_env} wheel --version > /dev/null 2>&1 || wheel_support_flag='--no-use-wheel'; } ; { ${pip_env} --log ${log}/pip.log install ${install_args} \$wheel_support_flag ${proxy_flag} ${install_args} ${install_editable} ${source}@${ensure}#egg=${egg_name} || ${pip_env} --log ${log}/pip.log install ${install_args} ${proxy_flag} ${install_args} ${install_editable} ${source}@${ensure}#egg=${egg_name} ;}",
164168
unless => "${pip_env} freeze | grep -i -e ${grep_regex}",
165169
user => $owner,
170+
group => $group,
166171
cwd => $cwd,
167172
environment => $environment,
168173
path => ['/usr/local/bin','/usr/bin','/bin', '/usr/sbin'],
@@ -174,6 +179,7 @@
174179
command => "${pip_env} wheel --help > /dev/null 2>&1 && { ${pip_env} wheel --version > /dev/null 2>&1 || wheel_support_flag='--no-use-wheel'; } ; { ${pip_env} --log ${log}/pip.log install ${install_args} \$wheel_support_flag ${proxy_flag} ${install_args} ${install_editable} ${source} || ${pip_env} --log ${log}/pip.log install ${install_args} ${proxy_flag} ${install_args} ${install_editable} ${source} ;}",
175180
unless => "${pip_env} freeze | grep -i -e ${grep_regex}",
176181
user => $owner,
182+
group => $group,
177183
cwd => $cwd,
178184
environment => $environment,
179185
path => ['/usr/local/bin','/usr/bin','/bin', '/usr/sbin'],
@@ -190,6 +196,7 @@
190196
command => "${pip_env} wheel --help > /dev/null 2>&1 && { ${pip_env} wheel --version > /dev/null 2>&1 || wheel_support_flag='--no-use-wheel'; } ; { ${pip_env} --log ${log}/pip.log install ${install_args} \$wheel_support_flag ${proxy_flag} ${install_args} ${install_editable} ${source}==${ensure} || ${pip_env} --log ${log}/pip.log install ${install_args} ${proxy_flag} ${install_args} ${install_editable} ${source}==${ensure} ;}",
191197
unless => "${pip_env} freeze | grep -i -e ${grep_regex}",
192198
user => $owner,
199+
group => $group,
193200
cwd => $cwd,
194201
environment => $environment,
195202
path => ['/usr/local/bin','/usr/bin','/bin', '/usr/sbin'],
@@ -203,6 +210,7 @@
203210
command => "${pip_env} wheel --help > /dev/null 2>&1 && { ${pip_env} wheel --version > /dev/null 2>&1 || wheel_support_flag='--no-use-wheel'; } ; { ${pip_env} --log ${log}/pip.log install \$wheel_support_flag ${proxy_flag} ${install_args} ${install_editable} ${source} || ${pip_env} --log ${log}/pip.log install ${proxy_flag} ${install_args} ${install_editable} ${source} ;}",
204211
unless => "${pip_env} freeze | grep -i -e ${grep_regex}",
205212
user => $owner,
213+
group => $group,
206214
cwd => $cwd,
207215
environment => $environment,
208216
path => ['/usr/local/bin','/usr/bin','/bin', '/usr/sbin'],
@@ -216,6 +224,7 @@
216224
command => "${pip_env} wheel --help > /dev/null 2>&1 && { ${pip_env} wheel --version > /dev/null 2>&1 || wheel_support_flag='--no-use-wheel'; } ; { ${pip_env} --log ${log}/pip.log install --upgrade \$wheel_support_flag ${proxy_flag} ${install_args} ${install_editable} ${source} || ${pip_env} --log ${log}/pip.log install --upgrade ${proxy_flag} ${install_args} ${install_editable} ${source} ;}",
217225
unless => "${pip_env} search ${proxy_flag} ${source} | grep -i INSTALLED | grep -i latest",
218226
user => $owner,
227+
group => $group,
219228
cwd => $cwd,
220229
environment => $environment,
221230
path => ['/usr/local/bin','/usr/bin','/bin', '/usr/sbin'],
@@ -229,6 +238,7 @@
229238
command => "echo y | ${pip_env} uninstall ${uninstall_args} ${proxy_flag}",
230239
onlyif => "${pip_env} freeze | grep -i -e ${grep_regex}",
231240
user => $owner,
241+
group => $group,
232242
cwd => $cwd,
233243
environment => $environment,
234244
path => ['/usr/local/bin','/usr/bin','/bin', '/usr/sbin'],

0 commit comments

Comments
 (0)