From 0c6ca2848fbbe849a3e59779ffeb2c7979c6b0c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Pinson?= Date: Fri, 22 Mar 2013 10:09:35 +0100 Subject: Doc and lint --- manifests/files.pp | 4 ++++ manifests/init.pp | 8 ++++++++ manifests/lens.pp | 53 +++++++++++++++++++++++++++-------------------------- 3 files changed, 39 insertions(+), 26 deletions(-) (limited to 'manifests') 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" -- cgit v1.2.3