From 77a9b7e32e42f124b1293f172c0ceba81ff2dd59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Pinson?= Date: Mon, 18 Mar 2013 11:57:30 +0100 Subject: Use validate_re to check $augeas::lens_dir in augeas::lens --- .fixtures.yml | 2 ++ manifests/lens.pp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.fixtures.yml b/.fixtures.yml index d8386fa..f074a0f 100644 --- a/.fixtures.yml +++ b/.fixtures.yml @@ -1,3 +1,5 @@ fixtures: + repositories: + "stdlib": "git://github.com/puppetlabs/puppetlabs-stdlib.git" symlinks: "augeas": "#{source_dir}" diff --git a/manifests/lens.pp b/manifests/lens.pp index 723f217..def3768 100644 --- a/manifests/lens.pp +++ b/manifests/lens.pp @@ -35,6 +35,8 @@ define augeas::lens ( if (!$stock_since or versioncmp($::augeasversion, $stock_since) < 0) { + validate_re($augeas::lens_dir, '/.*', '$augeas::lens_dir must be a valid path') + $lens_dest = "${augeas::lens_dir}/${name}.aug" $test_dest = "${augeas::lens_dir}/tests/test_${name}.aug" -- cgit v1.2.3