summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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"