diff options
author | Vik Bhatti <vik@vikbhatti.com> | 2014-04-08 14:50:52 +0100 |
---|---|---|
committer | Vik Bhatti <vik@vikbhatti.com> | 2014-04-08 14:50:52 +0100 |
commit | 8d9ea35a00f133083e752d199a1102b00827876f (patch) | |
tree | f86cad23c5c5f842442b15a905ea3c92262cf254 /manifests/requirements.pp | |
parent | 275cd8672ac5a0144f4d96ba39f0db6705786fc4 (diff) | |
parent | c3a5a8f338776255859d50f4b906642f540cb162 (diff) |
Pulled from upstream
Diffstat (limited to 'manifests/requirements.pp')
-rw-r--r-- | manifests/requirements.pp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/manifests/requirements.pp b/manifests/requirements.pp index 010a199..11c5f00 100644 --- a/manifests/requirements.pp +++ b/manifests/requirements.pp @@ -27,6 +27,11 @@ # [*environment*] # Additional environment variables required to install the packages. Default: none # +# [*forceupdate*] +# Run a pip install requirements even if we don't receive an event from the +# requirements file - Useful for when the requirements file is written as part of a +# resource other than file (E.g vcsrepo) +# # === Examples # # python::requirements { '/var/www/project1/requirements.txt': @@ -47,7 +52,8 @@ define python::requirements ( $group = 'root', $proxy = false, $src = false, - $environment = [] + $environment = [], + $forceupdate = false, ) { if $virtualenv == 'system' and ($owner != 'root' or $group != 'root') { @@ -90,12 +96,13 @@ define python::requirements ( exec { "python_requirements${name}": provider => shell, - command => "${pip_env} --log-file ${cwd}/pip.log install ${proxy_flag} ${src_flag} -r ${requirements}", - refreshonly => true, + command => "${pip_env} --log ${cwd}/pip.log install ${proxy_flag} ${src_flag} -r ${requirements}", + refreshonly => !$forceupdate, timeout => 1800, user => $owner, subscribe => File[$requirements], environment => $environment, + path => ['/usr/local/bin','/usr/bin','/bin', '/usr/sbin'], } } |