diff options
author | Sergey Stankevich <sergey@stankevi.ch> | 2013-05-06 06:08:12 -0700 |
---|---|---|
committer | Sergey Stankevich <sergey@stankevi.ch> | 2013-05-06 06:08:12 -0700 |
commit | 2f91e3286888d147ab5fc1aca1e5a57b0b9f52f3 (patch) | |
tree | 442bccfa885c7af24dfc62ffadcc9670b3091c9a /manifests/requirements.pp | |
parent | c1a73e2a57b9177ce8781cb6eb846505e0af8bed (diff) | |
parent | ee2a67ad8596fa68cb3952e9ee659546f6cbd66d (diff) |
Merge pull request #11 from theospears/virtualenv_owner
Allow setting owner for virtualenv and requirements
Diffstat (limited to 'manifests/requirements.pp')
-rw-r--r-- | manifests/requirements.pp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/manifests/requirements.pp b/manifests/requirements.pp index 0559632..3a32b0f 100644 --- a/manifests/requirements.pp +++ b/manifests/requirements.pp @@ -28,7 +28,9 @@ define python::requirements ( $requirements = $name, $virtualenv = 'system', - $proxy = false + $proxy = false, + $owner = 'root', + $group = 'root' ) { $cwd = $virtualenv ? { @@ -54,8 +56,8 @@ define python::requirements ( file { $requirements: ensure => present, mode => '0644', - owner => 'root', - group => 'root', + owner => $owner, + group => $group, replace => false, content => '# Puppet will install and/or update pip packages listed here', } @@ -65,6 +67,7 @@ define python::requirements ( exec { "python_requirements_check_${name}": command => "sha1sum ${requirements} > ${req_crc}", unless => "sha1sum -c ${req_crc}", + user => $owner, require => File[$requirements], } @@ -74,6 +77,7 @@ define python::requirements ( cwd => $cwd, refreshonly => true, timeout => 1800, + user => $owner, subscribe => Exec["python_requirements_check_${name}"], } |