summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorRaphaël Pinson <raphael.pinson@camptocamp.com>2013-03-15 20:39:38 +0100
committerRaphaël Pinson <raphael.pinson@camptocamp.com>2013-03-15 20:39:38 +0100
commit461deeeebf4336fe485f566083813e9d1ac3f9ab (patch)
tree27b6341f290ec1c97ef6abd239862000196b3412 /manifests
parenta534f53b803ba46dd7ea2b55312949af688f850b (diff)
Fix augeas::lens
Diffstat (limited to 'manifests')
-rw-r--r--manifests/lens.pp8
1 files changed, 4 insertions, 4 deletions
diff --git a/manifests/lens.pp b/manifests/lens.pp
index f4d2ba2..723f217 100644
--- a/manifests/lens.pp
+++ b/manifests/lens.pp
@@ -29,11 +29,11 @@ define augeas::lens (
$test_source=false,
$stock_since=false,
) {
+ if !defined(Class['augeas']) {
+ fail('You must declare the augeas class before using augeas::lens')
+ }
- if (!$stock_since or !versioncmp($::augeasversion, $stock_since)) {
- if !defined(Class['augeas']) {
- fail('You must declare the augeas class before using augeas::lens')
- }
+ if (!$stock_since or versioncmp($::augeasversion, $stock_since) < 0) {
$lens_dest = "${augeas::lens_dir}/${name}.aug"
$test_dest = "${augeas::lens_dir}/tests/test_${name}.aug"