summaryrefslogtreecommitdiff
path: root/manifests/lens.pp
diff options
context:
space:
mode:
authorRaphaël Pinson <raphael.pinson@camptocamp.com>2013-03-22 10:09:35 +0100
committerRaphaël Pinson <raphael.pinson@camptocamp.com>2013-03-22 10:09:35 +0100
commit0c6ca2848fbbe849a3e59779ffeb2c7979c6b0c2 (patch)
tree183bf4720e9df2b28eb5abdc819a44bf97e88eb3 /manifests/lens.pp
parent50914333ba51f58d4a4419b8171094b9eabb6fca (diff)
Doc and lint
Diffstat (limited to 'manifests/lens.pp')
-rw-r--r--manifests/lens.pp53
1 files changed, 27 insertions, 26 deletions
diff --git a/manifests/lens.pp b/manifests/lens.pp
index 06db221..ac4fddf 100644
--- a/manifests/lens.pp
+++ b/manifests/lens.pp
@@ -1,28 +1,25 @@
-/*
-
-== Definition: augeas::lens
-
-Deploy an Augeas lens (and its test file).
-Check the lens (and run the unit tests) automatically and remove the files if
-the checks fail.
-
-Parameters:
-- *ensure*: present/absent
-- *lens_source*: the source for the lens
-- *test_source*: optionally, the source for the test file.
-- *stock_since*: optionally, indicate in which version of Augeas
- the lens became stock, so it will not be deployed above that version.
-
-Example usage:
-
- augeas::lens { 'networkmanager':
- lens_source => 'puppet:///modules/networkmanager/lenses/networkmanager.aug',
- test_source => 'puppet:///modules/networkmanager/lenses/test_networkmanager.aug',
- stock_since => '1.0.0',
- }
-
-*/
-
+# Definition: augeas::lens
+#
+# Deploy an Augeas lens (and its test file).
+# Check the lens (and run the unit tests) automatically and remove the files if
+# the checks fail.
+#
+# Parameters:
+# ['ensure'] - present/absent
+# ['lens_source'] - the source for the lens
+# ['test_source'] - optionally, the source for the test file.
+# ['stock_since'] - optionally, indicate in which version of Augeas
+# the lens became stock, so it will not be deployed
+# above that version.
+#
+# Example usage:
+#
+# augeas::lens { 'networkmanager':
+# lens_source => 'puppet:///modules/networkmanager/lenses/networkmanager.aug',
+# test_source => 'puppet:///modules/networkmanager/lenses/test_networkmanager.aug',
+# stock_since => '1.0.0',
+# }
+#
define augeas::lens (
$lens_source,
$ensure=present,
@@ -35,7 +32,11 @@ define augeas::lens (
if (!$stock_since or versioncmp($::augeasversion, $stock_since) < 0) {
- validate_re($augeas::lens_dir, '/.*', "'${augeas::lens_dir}' is not a valid path for lens ${name}")
+ validate_re(
+ $augeas::lens_dir,
+ '/.*',
+ "'${augeas::lens_dir}' is not a valid path for lens ${name}"
+ )
$lens_dest = "${augeas::lens_dir}/${name}.aug"
$test_dest = "${augeas::lens_dir}/tests/test_${name}.aug"