~ubuntu-branches/ubuntu/lucid/puppet/lucid-security

« back to all changes in this revision

Viewing changes to lib/puppet/reference/type.rb

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2009-12-23 00:48:10 UTC
  • mfrom: (1.1.10 upstream) (3.1.7 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091223004810-3i4oryds922g5n59
Tags: 0.25.1-3ubuntu1
* Merge from debian testing.  Remaining changes:
  - debian/rules:
    + Don't start puppet when first installing puppet.
  - debian/puppet.conf, lib/puppet/defaults.rb:
    + Move templates to /etc/puppet
  - lib/puppet/defaults.rb:
    + Fix /var/lib/puppet/state ownership.
  - man/man8/puppet.conf.8: 
    + Fix broken URL in manpage.
  - debian/control:
    + Update maintainer accordint to spec.
    + Puppetmaster Recommends -> Suggests
    + Created puppet-testsuite as a seperate. Allow the users to run puppet's 
      testsuite.
  - tests/Rakefile: Fix rakefile so that the testsuite can acutally be ran.

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
    }
10
10
 
11
11
    str = %{
12
 
Metaparameters
13
 
--------------
14
 
Metaparameters are parameters that work with any resource type; they are part of the
15
 
Puppet framework itself rather than being part of the implementation of any
16
 
given instance.  Thus, any defined metaparameter can be used with any instance
17
 
in your manifest, including defined components.
18
 
 
19
 
Available Metaparameters
20
 
++++++++++++++++++++++++
21
 
}
22
 
    begin
23
 
        params = []
24
 
        Puppet::Type.eachmetaparam { |param|
25
 
            params << param
26
 
        }
27
 
 
28
 
        params.sort { |a,b|
29
 
            a.to_s <=> b.to_s
30
 
        }.each { |param|
31
 
            str += paramwrap(param.to_s, scrub(Puppet::Type.metaparamdoc(param)), :level => 4)
32
 
            #puts "<dt>" + param.to_s + "</dt>"
33
 
            #puts tab(1) + Puppet::Type.metaparamdoc(param).scrub.indent($tab)gsub(/\n\s*/,' ')
34
 
            #puts "<dd>"
35
 
            #puts indent(scrub(Puppet::Type.metaparamdoc(param)), $tab)
36
 
            #puts scrub(Puppet::Type.metaparamdoc(param))
37
 
            #puts "</dd>"
38
 
 
39
 
            #puts ""
40
 
        }
41
 
    rescue => detail
42
 
        puts detail.backtrace
43
 
        puts "incorrect metaparams: %s" % detail
44
 
        exit(1)
45
 
    end
46
 
 
47
 
    str += %{
48
12
 
49
13
Resource Types
50
14
--------------
53
17
  This is the parameter that gets assigned when a string is provided before
54
18
  the colon in a type declaration.  In general, only developers will need to
55
19
  worry about which parameter is the ``namevar``.
56
 
  
 
20
 
57
21
  In the following code::
58
22
 
59
23
      file { "/etc/passwd":