summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJeff McCune <jeff@puppetlabs.com>2011-02-23 14:05:56 -0500
committerJeff McCune <jeff@puppetlabs.com>2011-02-23 14:05:56 -0500
commit384ffd957153f65eb4f47b3142d98853c31b4124 (patch)
treea46170c873e3e93a3261a1a93eb72a8466e8abba /lib
Initial commit
Diffstat (limited to 'lib')
-rw-r--r--lib/puppet/facter/README.markdown22
-rw-r--r--lib/puppet/parser/functions/README.markdown17
-rw-r--r--lib/puppet/provider/README.markdown14
-rw-r--r--lib/puppet/type/README.markdown14
4 files changed, 67 insertions, 0 deletions
diff --git a/lib/puppet/facter/README.markdown b/lib/puppet/facter/README.markdown
new file mode 100644
index 0000000..2b96273
--- /dev/null
+++ b/lib/puppet/facter/README.markdown
@@ -0,0 +1,22 @@
+Facter
+======
+
+Define facts in this directory.
+
+Sometimes you need to be able to write conditional expressions based
+on site-specific data that just isn’t available via Facter. The
+solution may be to add a fact to Facter. These additional facts can
+then be distributed to Puppet clients and are available for use in
+manifests. Learn more at
+http://projects.puppetlabs.com/projects/puppet/wiki/Adding_Facts
+
+File paths should match the fact name; for example, a fact
+`hardware_platform`, defined like this:
+
+ Facter.add("hardware_platform") do
+ setcode do
+ %x{/bin/uname -i}.chomp
+ end
+ end
+
+Should be found in `hardware_platform.rb` in this directory.
diff --git a/lib/puppet/parser/functions/README.markdown b/lib/puppet/parser/functions/README.markdown
new file mode 100644
index 0000000..15d7495
--- /dev/null
+++ b/lib/puppet/parser/functions/README.markdown
@@ -0,0 +1,17 @@
+Functions
+=========
+
+Define functions in this directory.
+
+File paths should match the function name; for example, a function
+`myfunction`, defined like this:
+
+ Puppet::Parser::Functions::newfunction(
+ :myfunction,
+ :type => :statement,
+ :doc => "Documentation here."
+ ) do |vals|
+ # ...
+ end
+
+Should be found in `myfunction.rb` in this directory.
diff --git a/lib/puppet/provider/README.markdown b/lib/puppet/provider/README.markdown
new file mode 100644
index 0000000..27aa1a9
--- /dev/null
+++ b/lib/puppet/provider/README.markdown
@@ -0,0 +1,14 @@
+Providers
+=========
+
+Define providers under this directory.
+
+File paths should match the resource type name and provider name; for
+example, a provider `myprovider` for a resource type `mytype`, defined like this:
+
+ Puppet::Type.type(:mytype).provide(:myprovider) do
+ desc "Documentation here"
+ # ...
+ end
+
+Should be found in `mytype/myprovider.rb` under this directory.
diff --git a/lib/puppet/type/README.markdown b/lib/puppet/type/README.markdown
new file mode 100644
index 0000000..7a169c7
--- /dev/null
+++ b/lib/puppet/type/README.markdown
@@ -0,0 +1,14 @@
+Resource Types
+==============
+
+Define resource types in this directory.
+
+Filenames should match the resource type name; for example, a resource
+type `mytype`, defined like this:
+
+ Puppet::Type.newtype(:mytype) do
+ @doc = "Documentation here."
+ # ...
+ end
+
+Should be found in `mytype.rb`