summaryrefslogtreecommitdiff
path: root/manifests
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
parent50914333ba51f58d4a4419b8171094b9eabb6fca (diff)
Doc and lint
Diffstat (limited to 'manifests')
-rw-r--r--manifests/files.pp4
-rw-r--r--manifests/init.pp8
-rw-r--r--manifests/lens.pp53
3 files changed, 39 insertions, 26 deletions
diff --git a/manifests/files.pp b/manifests/files.pp
index 01427ad..4f36a57 100644
--- a/manifests/files.pp
+++ b/manifests/files.pp
@@ -1,3 +1,7 @@
+# Class: augeas::files
+#
+# Sets up directories and files for Augeas
+#
class augeas::files {
$lens_dir = $augeas::lens_dir
diff --git a/manifests/init.pp b/manifests/init.pp
index 6374955..80fbbd8 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -1,3 +1,11 @@
+# Class: augeas
+#
+# Install and configure Augeas
+#
+# Parameters:
+# ['version'] - the desired version of Augeas
+# ['ruby_version'] - the desired version of the Ruby bindings for Augeas
+# ['lens_dir'] - the lens directory to use
class augeas (
$version = $augeas_version,
$ruby_version = $augeas_ruby_version,
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"