From 600754c8d841646c73df3e0fe5d4290e8ddfd37d Mon Sep 17 00:00:00 2001 From: Nan Liu Date: Mon, 25 Jun 2012 13:43:26 -0700 Subject: Update documentation and README. --- README.md | 24 ++++++++++++++++-------- manifests/file.pp | 21 ++++++++++++++++++++- manifests/init.pp | 2 +- manifests/params.pp | 9 +-------- 4 files changed, 38 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 9bd2000..d1c41c7 100644 --- a/README.md +++ b/README.md @@ -32,13 +32,16 @@ Example: Parameters: -* ensure: file type, default file. -* recurse: file recurse, default false. -* owner: file owner, default tftp. -* group: file group. default tftp. -* mode: file mode, default 0644 (puppet will change to 0755 for directories). -* content: file content. -* source: file source. +* ensure: file type, default file. +* owner: file owner, default tftp. +* group: file group. default tftp. +* mode: file mode, default 0644 (puppet will change to 0755 for directories). +* content: file content. +* source: file source, defaults to puppet:///module/${caller_module_name}/${name} for files without content. +* recurse: directory recurse, default false. +* purge: directory recurse and purge. +* replace: replace directory with file or symlink, default undef, +* recurselimit: directory recurse limit, default undef, Example: @@ -51,9 +54,14 @@ Example: } tftp::file { 'pxelinux.cfg/default': - source => 'puppet:///modules/acme/default', + ensure => file, + source => 'puppet:///modules/acme/pxelinux.cfg/default', } +The last example can be abbreviated to the following if it's in the acme module: + + tftp::file { 'pxelinux.cfg/default': } + ## Example 1. tftp directories not in the OS package defaults should be managed as file resources. diff --git a/manifests/file.pp b/manifests/file.pp index b3985c7..3628188 100644 --- a/manifests/file.pp +++ b/manifests/file.pp @@ -2,12 +2,31 @@ # # Parameters: # +# [*ensure*]: file type, default file. +# [*owner*]: file owner, default tftp. +# [*group*]: file group. default tftp. +# [*mode*]: file mode, default 0644 (puppet will change to 0755 for directories). +# [*content*]: file content. +# [*source*]: file source, defaults to puppet*]:///module/${caller_module_name}/${name} for files without content. +# [*recurse*]: directory recurse, default false. +# [*purge*]: directory recurse and purge. +# [*replace*]: replace directory with file or symlink, default undef, +# [*recurselimit*]: directory recurse limit, default undef, +# # Actions: # -# Requires: +# Deploy files into the tftp directory. # # Usage: # +# tftp::file { 'pxelinux.0': +# source => 'puppet:///modules/acme/pxelinux.0', +# } +# +# tftp::file { 'pxelinux.cfg': +# ensure => directory, +# } +# define tftp::file ( $ensure = file, $owner = 'tftp', diff --git a/manifests/init.pp b/manifests/init.pp index 13954b5..9dfab37 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -18,7 +18,7 @@ # # Usage: # -# class tftp { +# class { 'tftp': # directory => '/opt/tftp', # address => $::ipaddress, # options => '--ipv6 --timeout 60', diff --git a/manifests/params.pp b/manifests/params.pp index 564e0f2..e658184 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -1,13 +1,6 @@ # Class: tftp::params # -# Parameters: -# -# Actions: -# -# Requires: -# -# Usage: -# +# TFTP class parameters. class tftp::params { $address = '0.0.0.0' $port = '69' -- cgit v1.2.3