summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorschacki <j.schackmann@reliatec.de>2013-05-20 15:17:03 +0200
committerschacki <j.schackmann@reliatec.de>2013-05-20 15:17:03 +0200
commit0132b8fb2abe798f2f27541816bdc71a9289b0ba (patch)
tree90adfe9d8dbb10fe198796d1d05fb50c989e5e43 /manifests
parent5d3b340ac6ebbee8cca959c2653f141e3030f646 (diff)
Removed SHA calculation from requirements and applied the audit option the requirements file resource which should do exaxtly the same out of the box
Diffstat (limited to 'manifests')
-rw-r--r--manifests/requirements.pp18
1 files changed, 4 insertions, 14 deletions
diff --git a/manifests/requirements.pp b/manifests/requirements.pp
index 67d24ce..8b94839 100644
--- a/manifests/requirements.pp
+++ b/manifests/requirements.pp
@@ -48,8 +48,6 @@ define python::requirements (
default => "--proxy=${proxy}",
}
- $req_crc = "${requirements}.sha1"
-
# This will ensure multiple python::virtualenv definitions can share the
# the same requirements file.
if !defined(File[$requirements]) {
@@ -58,28 +56,20 @@ define python::requirements (
mode => '0644',
owner => $owner,
group => $group,
+ audit => content,
replace => false,
content => '# Puppet will install and/or update pip packages listed here',
}
}
- # SHA1 checksum to detect changes
- exec { "python_requirements_check_${name}":
- provider => shell,
- command => "sha1sum ${requirements} > ${req_crc}",
- unless => "sha1sum -c ${req_crc}",
- user => $owner,
- require => File[$requirements],
- }
-
- exec { "python_requirements_update_${name}":
+ exec { "python_requirements${name}":
provider => shell,
- command => "${pip_env} install ${proxy_flag} -Ur ${requirements}",
+ command => "${pip_env} install ${proxy_flag} -r ${requirements}",
cwd => $cwd,
refreshonly => true,
timeout => 1800,
user => $owner,
- subscribe => Exec["python_requirements_check_${name}"],
+ subscribe => File[$requirements],
}
}