]> gitweb.fluxo.info Git - puppet-mailalias_core.git/commitdiff
Add Puppet Strings documentation
authorMelissa Stone <melissa@puppet.com>
Fri, 20 Apr 2018 18:19:24 +0000 (11:19 -0700)
committerMelissa Stone <melissa@puppet.com>
Fri, 20 Apr 2018 18:19:24 +0000 (11:19 -0700)
Gemfile
lib/puppet/provider/mailalias/aliases.rb
lib/puppet/type/mailalias.rb

diff --git a/Gemfile b/Gemfile
index 8daab33966cd8afc812ef50afb72114f079195e7..48e74c4c12f012717d9b94c6a670843b0c8e0f12 100644 (file)
--- a/Gemfile
+++ b/Gemfile
@@ -32,6 +32,10 @@ group :development do
   gem "puppet-module-posix-dev-r#{minor_version}",     require: false, platforms: [:ruby]
   gem "puppet-module-win-default-r#{minor_version}",   require: false, platforms: [:mswin, :mingw, :x64_mingw]
   gem "puppet-module-win-dev-r#{minor_version}",       require: false, platforms: [:mswin, :mingw, :x64_mingw]
+
+  # Puppet Strings for documentation purposes
+  gem 'puppet-strings'
+  gem 'rake'
 end
 
 group :system_tests do
index 9a9fa22fbc263eebeb7aefb37a883940d44116d1..c8e5e3ef8421d84dd58d4f1edebae61ec6f341ef 100644 (file)
@@ -6,6 +6,9 @@ Puppet::Type.type(:mailalias).provide(
   default_target: '/etc/aliases',
   filetype: :flat,
 ) do
+
+  desc 'The alias provider for mailalias.'
+
   text_line :comment, match: %r{^#}
   text_line :blank, match: %r{^\s*$}
 
index b26cd1235e938785ba8a98603f3457aa02456b2a..fde34be7f1a5e7748eb7b70a3aa90ceab851701f 100644 (file)
@@ -1,7 +1,15 @@
 # Creates an email alias in the local alias database.
 module Puppet
   Type.newtype(:mailalias) do
-    @doc = 'Creates an email alias in the local alias database.'
+    desc <<-DESC
+Creates an email alias in the local alias database.
+
+@example using mailalias to redirect mail for the ftp account to root's mailbox
+mailalias { 'ftp':
+  ensure => present,
+  recipient => 'root',
+}
+    DESC
 
     ensurable