puppet 3.0.2 → 3.1.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of puppet might be problematic. Click here for more details.
- data/Gemfile +13 -11
- data/README.md +9 -7
- data/README_DEVELOPER.md +21 -30
- data/bin/extlookup2hiera +0 -0
- data/conf/auth.conf +42 -26
- data/conf/fileserver.conf +41 -0
- data/conf/tagmail.conf +16 -0
- data/examples/hiera/modules/data/manifests/common.pp +2 -1
- data/examples/hiera/modules/ntp/manifests/config.pp +4 -3
- data/examples/hiera/modules/ntp/manifests/data.pp +2 -1
- data/examples/hiera/modules/users/manifests/common.pp +2 -1
- data/examples/hiera/modules/users/manifests/dc1.pp +2 -1
- data/examples/hiera/modules/users/manifests/development.pp +2 -1
- data/examples/hiera/site.pp +1 -1
- data/ext/debian/fileserver.conf +39 -15
- data/ext/envpuppet +2 -0
- data/ext/gentoo/puppet/fileserver.conf +41 -12
- data/ext/ips/puppet-agent +1 -6
- data/ext/ips/puppetagent.xml +0 -4
- data/ext/osx/postflight.erb +109 -0
- data/ext/project_data.yaml +2 -2
- data/ext/redhat/fileserver.conf +41 -12
- data/ext/redhat/puppet.spec.erb +8 -13
- data/install.rb +2 -5
- data/lib/puppet.rb +30 -13
- data/lib/puppet/application.rb +34 -16
- data/lib/puppet/application/agent.rb +4 -4
- data/lib/puppet/application/master.rb +25 -5
- data/lib/puppet/defaults.rb +11 -7
- data/lib/puppet/dsl.rb +7 -3
- data/lib/puppet/dsl/actions.rb +283 -0
- data/lib/puppet/dsl/blank_slate.rb +55 -0
- data/lib/puppet/dsl/context.rb +393 -0
- data/lib/puppet/dsl/parser.rb +57 -0
- data/lib/puppet/dsl/resource_decorator.rb +56 -0
- data/lib/puppet/dsl/resource_reference.rb +95 -0
- data/lib/puppet/dsl/type_reference.rb +102 -0
- data/lib/puppet/error.rb +1 -1
- data/lib/puppet/face/help.rb +2 -4
- data/lib/puppet/face/man.rb +8 -2
- data/lib/puppet/feature/pson.rb +1 -3
- data/lib/puppet/indirector/catalog/active_record.rb +3 -0
- data/lib/puppet/indirector/catalog/compiler.rb +1 -2
- data/lib/puppet/indirector/catalog/queue.rb +4 -0
- data/lib/puppet/indirector/catalog/static_compiler.rb +30 -0
- data/lib/puppet/indirector/catalog/store_configs.rb +3 -0
- data/lib/puppet/indirector/certificate_request/rest.rb +1 -0
- data/lib/puppet/indirector/certificate_revocation_list/rest.rb +1 -0
- data/lib/puppet/indirector/certificate_status/file.rb +4 -0
- data/lib/puppet/indirector/certificate_status/rest.rb +1 -0
- data/lib/puppet/indirector/facts/active_record.rb +3 -0
- data/lib/puppet/indirector/facts/couch.rb +3 -0
- data/lib/puppet/indirector/facts/inventory_active_record.rb +4 -0
- data/lib/puppet/indirector/facts/store_configs.rb +3 -0
- data/lib/puppet/indirector/file_metadata/rest.rb +2 -0
- data/lib/puppet/indirector/instrumentation_data/local.rb +3 -0
- data/lib/puppet/indirector/instrumentation_data/rest.rb +3 -0
- data/lib/puppet/indirector/instrumentation_listener/local.rb +3 -0
- data/lib/puppet/indirector/instrumentation_listener/rest.rb +3 -0
- data/lib/puppet/indirector/instrumentation_probe/local.rb +3 -0
- data/lib/puppet/indirector/instrumentation_probe/rest.rb +3 -0
- data/lib/puppet/indirector/node/active_record.rb +3 -0
- data/lib/puppet/indirector/node/rest.rb +2 -2
- data/lib/puppet/indirector/node/store_configs.rb +3 -0
- data/lib/puppet/indirector/node/write_only_yaml.rb +32 -0
- data/lib/puppet/indirector/queue.rb +0 -1
- data/lib/puppet/indirector/request.rb +1 -2
- data/lib/puppet/indirector/resource/active_record.rb +4 -0
- data/lib/puppet/indirector/resource/ral.rb +3 -0
- data/lib/puppet/indirector/resource/rest.rb +3 -0
- data/lib/puppet/indirector/resource/store_configs.rb +3 -0
- data/lib/puppet/indirector/run/local.rb +3 -0
- data/lib/puppet/indirector/ssl_file.rb +16 -14
- data/lib/puppet/indirector/status/local.rb +3 -0
- data/lib/puppet/indirector/status/rest.rb +4 -0
- data/lib/puppet/interface.rb +78 -3
- data/lib/puppet/interface/action.rb +39 -3
- data/lib/puppet/interface/action_builder.rb +74 -1
- data/lib/puppet/interface/action_manager.rb +33 -3
- data/lib/puppet/interface/documentation.rb +116 -5
- data/lib/puppet/interface/face_collection.rb +6 -7
- data/lib/puppet/interface/option.rb +10 -1
- data/lib/puppet/interface/option_builder.rb +29 -1
- data/lib/puppet/interface/option_manager.rb +21 -6
- data/lib/puppet/metatype/manager.rb +47 -9
- data/lib/puppet/module_tool.rb +0 -1
- data/lib/puppet/network/formats.rb +0 -2
- data/lib/puppet/node.rb +2 -3
- data/lib/puppet/node/environment.rb +14 -1
- data/lib/puppet/parameter.rb +309 -44
- data/lib/puppet/parameter/package_options.rb +5 -0
- data/lib/puppet/parameter/path.rb +26 -3
- data/lib/puppet/parameter/value.rb +30 -6
- data/lib/puppet/parameter/value_collection.rb +82 -20
- data/lib/puppet/parser.rb +3 -0
- data/lib/puppet/parser/ast/definition.rb +2 -5
- data/lib/puppet/parser/ast/hostclass.rb +2 -3
- data/lib/puppet/parser/ast/node.rb +2 -5
- data/lib/puppet/parser/ast/resourceparam.rb +1 -1
- data/lib/puppet/parser/compiler.rb +10 -0
- data/lib/puppet/parser/functions.rb +111 -7
- data/lib/puppet/parser/functions/create_resources.rb +23 -2
- data/lib/puppet/parser/functions/defined.rb +1 -1
- data/lib/puppet/parser/functions/extlookup.rb +2 -1
- data/lib/puppet/parser/functions/fail.rb +1 -1
- data/lib/puppet/parser/functions/file.rb +1 -1
- data/lib/puppet/parser/functions/fqdn_rand.rb +1 -1
- data/lib/puppet/parser/functions/generate.rb +1 -1
- data/lib/puppet/parser/functions/hiera.rb +1 -1
- data/lib/puppet/parser/functions/hiera_array.rb +1 -1
- data/lib/puppet/parser/functions/hiera_hash.rb +1 -1
- data/lib/puppet/parser/functions/hiera_include.rb +1 -1
- data/lib/puppet/parser/functions/include.rb +1 -1
- data/lib/puppet/parser/functions/inline_template.rb +1 -1
- data/lib/puppet/parser/functions/md5.rb +1 -1
- data/lib/puppet/parser/functions/realize.rb +1 -1
- data/lib/puppet/parser/functions/regsubst.rb +54 -57
- data/lib/puppet/parser/functions/require.rb +1 -0
- data/lib/puppet/parser/functions/search.rb +1 -1
- data/lib/puppet/parser/functions/sha1.rb +1 -1
- data/lib/puppet/parser/functions/shellquote.rb +1 -1
- data/lib/puppet/parser/functions/split.rb +1 -2
- data/lib/puppet/parser/functions/sprintf.rb +7 -10
- data/lib/puppet/parser/functions/tag.rb +1 -1
- data/lib/puppet/parser/functions/tagged.rb +1 -1
- data/lib/puppet/parser/functions/template.rb +1 -1
- data/lib/puppet/parser/functions/versioncmp.rb +1 -5
- data/lib/puppet/parser/parser_support.rb +11 -27
- data/lib/puppet/parser/scope.rb +48 -4
- data/lib/puppet/parser/type_loader.rb +31 -7
- data/lib/puppet/property.rb +304 -70
- data/lib/puppet/property/ensure.rb +14 -1
- data/lib/puppet/property/keyvalue.rb +17 -8
- data/lib/puppet/property/list.rb +3 -0
- data/lib/puppet/property/ordered_list.rb +7 -0
- data/lib/puppet/provider.rb +275 -53
- data/lib/puppet/provider/augeas/augeas.rb +17 -3
- data/lib/puppet/provider/confiner.rb +30 -1
- data/lib/puppet/provider/group/pw.rb +2 -2
- data/lib/puppet/provider/package/pip.rb +0 -1
- data/lib/puppet/provider/package/pkgin.rb +2 -0
- data/lib/puppet/provider/service/bsd.rb +1 -1
- data/lib/puppet/provider/service/freebsd.rb +10 -6
- data/lib/puppet/provider/service/init.rb +1 -1
- data/lib/puppet/provider/service/service.rb +1 -1
- data/lib/puppet/provider/user/pw.rb +2 -2
- data/lib/puppet/provider/user/useradd.rb +2 -3
- data/lib/puppet/reference/configuration.rb +6 -0
- data/lib/puppet/reports.rb +44 -4
- data/lib/puppet/reports/tagmail.rb +1 -1
- data/lib/puppet/resource.rb +38 -25
- data/lib/puppet/resource/type.rb +14 -6
- data/lib/puppet/settings.rb +66 -142
- data/lib/puppet/settings/config_file.rb +99 -0
- data/lib/puppet/settings/file_setting.rb +92 -24
- data/lib/puppet/settings/value_translator.rb +15 -0
- data/lib/puppet/ssl/certificate_authority/interface.rb +2 -2
- data/lib/puppet/test/test_helper.rb +8 -3
- data/lib/puppet/transaction.rb +1 -2
- data/lib/puppet/transaction/report.rb +122 -13
- data/lib/puppet/type.rb +763 -150
- data/lib/puppet/type/augeas.rb +4 -0
- data/lib/puppet/type/file/ensure.rb +1 -1
- data/lib/puppet/type/file/group.rb +1 -1
- data/lib/puppet/type/file/mode.rb +2 -0
- data/lib/puppet/type/file/selcontext.rb +1 -0
- data/lib/puppet/type/group.rb +12 -0
- data/lib/puppet/type/mount.rb +2 -2
- data/lib/puppet/type/notify.rb +1 -1
- data/lib/puppet/type/router.rb +1 -1
- data/lib/puppet/type/service.rb +1 -0
- data/lib/puppet/type/ssh_authorized_key.rb +3 -1
- data/lib/puppet/type/user.rb +8 -1
- data/lib/puppet/util.rb +8 -0
- data/lib/puppet/util/autoload.rb +7 -10
- data/lib/puppet/util/classgen.rb +58 -33
- data/lib/puppet/util/command_line.rb +120 -77
- data/lib/puppet/util/constant_inflector.rb +2 -0
- data/lib/puppet/util/execution.rb +63 -33
- data/lib/puppet/util/filetype.rb +1 -1
- data/lib/puppet/util/manifest_filetype_helper.rb +22 -0
- data/lib/puppet/util/methodhelper.rb +19 -0
- data/lib/puppet/util/monkey_patches.rb +46 -0
- data/lib/puppet/util/plugins.rb +2 -2
- data/lib/puppet/util/provider_features.rb +24 -8
- data/lib/puppet/util/rubygems.rb +8 -1
- data/lib/puppet/util/zaml.rb +1 -1
- data/lib/puppet/version.rb +74 -3
- data/spec/integration/application/apply_spec.rb +1 -1
- data/spec/integration/defaults_spec.rb +1 -0
- data/spec/integration/dsl/classes_spec.rb +191 -0
- data/spec/integration/dsl/defaults_spec.rb +38 -0
- data/spec/integration/dsl/definitions_spec.rb +73 -0
- data/spec/integration/dsl/functions_spec.rb +95 -0
- data/spec/integration/dsl/nodes_spec.rb +96 -0
- data/spec/integration/dsl/params_spec.rb +146 -0
- data/spec/integration/dsl/relationships_spec.rb +46 -0
- data/spec/integration/dsl/resources_spec.rb +202 -0
- data/spec/integration/dsl/type_loading_spec.rb +64 -0
- data/spec/integration/indirector/catalog/queue_spec.rb +1 -1
- data/spec/integration/network/formats_spec.rb +32 -45
- data/spec/integration/parser/collector_spec.rb +105 -25
- data/spec/integration/parser/scope_spec.rb +64 -1
- data/spec/integration/resource/catalog_spec.rb +2 -4
- data/spec/integration/type/package_spec.rb +1 -1
- data/spec/lib/matchers/catalog.rb +50 -0
- data/spec/lib/puppet_spec/compiler.rb +11 -0
- data/spec/lib/puppet_spec/dsl.rb +29 -0
- data/spec/spec_helper.rb +17 -3
- data/spec/unit/application/agent_spec.rb +0 -1
- data/spec/unit/application/apply_spec.rb +1 -1
- data/spec/unit/application/face_base_spec.rb +11 -4
- data/spec/unit/application/indirection_base_spec.rb +4 -8
- data/spec/unit/application/kick_spec.rb +5 -2
- data/spec/unit/application/master_spec.rb +0 -6
- data/spec/unit/application_spec.rb +38 -14
- data/spec/unit/dsl/actions_spec.rb +402 -0
- data/spec/unit/dsl/blank_slate_spec.rb +27 -0
- data/spec/unit/dsl/context_spec.rb +678 -0
- data/spec/unit/dsl/parser_spec.rb +56 -0
- data/spec/unit/dsl/resource_decorator_spec.rb +94 -0
- data/spec/unit/dsl/resource_reference_spec.rb +150 -0
- data/spec/unit/dsl/type_reference_spec.rb +164 -0
- data/spec/unit/face/help_spec.rb +5 -7
- data/spec/unit/indirector/certificate_request/rest_spec.rb +4 -0
- data/spec/unit/indirector/certificate_revocation_list/rest_spec.rb +4 -0
- data/spec/unit/indirector/certificate_status/rest_spec.rb +4 -0
- data/spec/unit/indirector/file_metadata/rest_spec.rb +5 -0
- data/spec/unit/indirector/hiera_spec.rb +3 -1
- data/spec/unit/indirector/queue_spec.rb +1 -7
- data/spec/unit/indirector/ssl_file_spec.rb +66 -39
- data/spec/unit/module_spec.rb +1 -1
- data/spec/unit/network/authstore_spec.rb +22 -1
- data/spec/unit/network/formats_spec.rb +1 -1
- data/spec/unit/node/environment_spec.rb +13 -0
- data/spec/unit/parser/collector_spec.rb +1 -1
- data/spec/unit/parser/compiler_spec.rb +26 -0
- data/spec/unit/parser/functions/create_resources_spec.rb +12 -1
- data/spec/unit/parser/functions/extlookup_spec.rb +4 -4
- data/spec/unit/parser/functions/hiera_array_spec.rb +1 -1
- data/spec/unit/parser/functions/hiera_hash_spec.rb +1 -1
- data/spec/unit/parser/functions/hiera_include_spec.rb +1 -1
- data/spec/unit/parser/functions/hiera_spec.rb +1 -1
- data/spec/unit/parser/functions/regsubst_spec.rb +4 -4
- data/spec/unit/parser/functions/split_spec.rb +4 -4
- data/spec/unit/parser/functions/sprintf_spec.rb +2 -2
- data/spec/unit/parser/functions/versioncmp_spec.rb +4 -4
- data/spec/unit/parser/functions_spec.rb +51 -1
- data/spec/unit/parser/parser_spec.rb +0 -14
- data/spec/unit/parser/type_loader_spec.rb +15 -1
- data/spec/unit/provider/augeas/augeas_spec.rb +31 -0
- data/spec/unit/provider/package/apt_spec.rb +0 -2
- data/spec/unit/provider/package/pip_spec.rb +12 -2
- data/spec/unit/provider/service/freebsd_spec.rb +8 -0
- data/spec/unit/provider/service/gentoo_spec.rb +20 -20
- data/spec/unit/provider/service/openrc_spec.rb +20 -20
- data/spec/unit/provider/service/src_spec.rb +4 -4
- data/spec/unit/provider/service/systemd_spec.rb +0 -8
- data/spec/unit/provider/service/windows_spec.rb +1 -1
- data/spec/unit/provider/user/useradd_spec.rb +2 -9
- data/spec/unit/relationship_spec.rb +2 -2
- data/spec/unit/resource/catalog_spec.rb +2 -2
- data/spec/unit/resource/type_spec.rb +49 -25
- data/spec/unit/resource_spec.rb +34 -2
- data/spec/unit/settings/config_file_spec.rb +100 -0
- data/spec/unit/settings/file_setting_spec.rb +87 -84
- data/spec/unit/settings/value_translator_spec.rb +77 -0
- data/spec/unit/settings_spec.rb +96 -29
- data/spec/unit/type/file/ensure_spec.rb +75 -36
- data/spec/unit/type/file_spec.rb +0 -68
- data/spec/unit/type/group_spec.rb +10 -0
- data/spec/unit/util/autoload_spec.rb +6 -0
- data/spec/unit/util/command_line_spec.rb +54 -62
- data/spec/unit/util/manifest_filetype_helper_spec.rb +29 -0
- data/spec/unit/util/metric_spec.rb +0 -9
- data/spec/unit/util/posix_spec.rb +0 -4
- data/spec/unit/util/rdoc_spec.rb +0 -12
- data/spec/unit/util/zaml_spec.rb +188 -130
- data/spec/unit/version_spec.rb +42 -0
- metadata +123 -90
- data/README_HIERA.md +0 -148
- data/conf/epm.list +0 -8
- data/conf/namespaceauth.conf +0 -20
- data/conf/puppet-queue.conf +0 -10
- data/examples/allatonce +0 -13
- data/examples/assignments +0 -11
- data/examples/components +0 -73
- data/examples/etc/init.d/sleeper +0 -70
- data/examples/etc/otherfile +0 -0
- data/examples/etc/puppet/fileserver.conf +0 -13
- data/examples/etc/puppet/namespaceauth.conf +0 -20
- data/examples/etc/puppet/puppet.conf +0 -10
- data/examples/etc/puppet/tagmail.conf +0 -1
- data/examples/execs +0 -16
- data/examples/file.bl +0 -11
- data/examples/filedefaults +0 -10
- data/examples/fileparsing +0 -116
- data/examples/filerecursion +0 -15
- data/examples/functions +0 -3
- data/examples/groups +0 -7
- data/examples/head +0 -30
- data/examples/importing +0 -8
- data/examples/mac_dscl.pp +0 -28
- data/examples/mac_dscl_revert.pp +0 -26
- data/examples/mac_pkgdmg.pp +0 -7
- data/examples/modules/sample_module.pp +0 -10
- data/examples/modules/sample_module/lib/puppet/parser/functions/hostname_to_dn.rb +0 -36
- data/examples/modules/sample_module/manifests/init.pp +0 -12
- data/examples/modules/sample_module/templates/sample.erb +0 -5
- data/examples/nodes +0 -20
- data/examples/one +0 -8
- data/examples/relationships +0 -34
- data/examples/selectors +0 -28
- data/examples/simpletests +0 -11
- data/examples/svncommit +0 -13
- data/lib/puppet/dsl/resource_api.rb +0 -120
- data/lib/puppet/dsl/resource_type_api.rb +0 -34
- data/spec/integration/parser/ruby_manifest_spec.rb +0 -127
- data/spec/unit/dsl/resource_api_spec.rb +0 -180
- data/spec/unit/dsl/resource_type_api_spec.rb +0 -53
data/examples/filedefaults
DELETED
data/examples/fileparsing
DELETED
@@ -1,116 +0,0 @@
|
|
1
|
-
# $Id$
|
2
|
-
|
3
|
-
# this will eventually parse different config files
|
4
|
-
|
5
|
-
# this creates the 'passwd' type, but it does not create any instances
|
6
|
-
filetype { "passwd":
|
7
|
-
linesplit => "\n",
|
8
|
-
escapednewlines => false
|
9
|
-
}
|
10
|
-
|
11
|
-
|
12
|
-
# this creates the 'PasswdUser' type, but again, no instances
|
13
|
-
filerecord { "user":
|
14
|
-
filetype => passwd,
|
15
|
-
fields => [name, password, uid, gid, gcos, home, shell],
|
16
|
-
namevar => name,
|
17
|
-
splitchar => ":"
|
18
|
-
|
19
|
-
}
|
20
|
-
|
21
|
-
filetype { ini:
|
22
|
-
linesplit => "\n\n"
|
23
|
-
}
|
24
|
-
|
25
|
-
# ini files are different because we don't really care about validating fields
|
26
|
-
# or at least, we can't do it for most files...
|
27
|
-
filerecord { "initrecord":
|
28
|
-
filetype => ini,
|
29
|
-
fields => [name, password, uid, gid, gcos, home, shell],
|
30
|
-
namevar => name,
|
31
|
-
splitchar => ":"
|
32
|
-
|
33
|
-
}
|
34
|
-
|
35
|
-
# this won't work for multiple record types, will it?
|
36
|
-
# or at least, it requires that we specify multiple times
|
37
|
-
# ah, and it doesn't specify which of the available record types
|
38
|
-
# it works for...
|
39
|
-
passwd { user:
|
40
|
-
complete => true, # manage the whole file
|
41
|
-
path => "/etc/passwd"
|
42
|
-
}
|
43
|
-
|
44
|
-
user { yaytest:
|
45
|
-
password => x,
|
46
|
-
uid => 10000,
|
47
|
-
gid => 10000,
|
48
|
-
home => "/home/yaytest",
|
49
|
-
gcos => "The Yaytest",
|
50
|
-
shell => "/bin/sh"
|
51
|
-
}
|
52
|
-
# there seems to be an intrinsic problem here -- i've got subtypes that only
|
53
|
-
# make sense when an instance of the super type already exists, and i need
|
54
|
-
# to associate the instances of the subtype with the instances of the supertype
|
55
|
-
# even if i created the parsers manually, I'd have the same problem
|
56
|
-
|
57
|
-
# this is the crux of it -- i want to be able to say 'user' here without having
|
58
|
-
# to specify the file, which leaves two options:
|
59
|
-
# 1) associate the record type with a filetype instance (BAD)
|
60
|
-
# 2) once the filetype and record type are created, have another command
|
61
|
-
# that specifically creates a filetype instance and gives names for instances
|
62
|
-
# of its record types
|
63
|
-
|
64
|
-
define syslog {
|
65
|
-
|
66
|
-
# create a new type, with all defaults
|
67
|
-
filetype { "syslog":
|
68
|
-
escapednewlines => true
|
69
|
-
}
|
70
|
-
|
71
|
-
filerecord { "log":
|
72
|
-
filetype => syslog,
|
73
|
-
regex => "^([^#\s]+)\s+(\S+)$",
|
74
|
-
joinchar => "\t",
|
75
|
-
fields => [logs, dest]
|
76
|
-
}
|
77
|
-
|
78
|
-
# these two should just be supported within the filetypes
|
79
|
-
filerecord { "comment":
|
80
|
-
filetype => syslog,
|
81
|
-
regex => "^(#.*)$",
|
82
|
-
joinchar => "s",
|
83
|
-
fields => [comment]
|
84
|
-
}
|
85
|
-
|
86
|
-
filerecord { "blank":
|
87
|
-
filetype => syslog,
|
88
|
-
regex => "^(\s*)$",
|
89
|
-
joinchar => "s",
|
90
|
-
fields => blank
|
91
|
-
}
|
92
|
-
}
|
93
|
-
|
94
|
-
define cron {
|
95
|
-
filetype { "usercrontab":
|
96
|
-
}
|
97
|
-
|
98
|
-
# this won't actually work, of course
|
99
|
-
filerecord { "cronjob":
|
100
|
-
filetype => crontab,
|
101
|
-
regex => "^([^#\s]+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(.+)$",
|
102
|
-
joinchar => " ",
|
103
|
-
fields => [minute, hour, day, month, weekday, command],
|
104
|
-
defaults => ["*", "*", "*", "*", "*", nil],
|
105
|
-
optional => [minute, hour, day, month, weekday]
|
106
|
-
}
|
107
|
-
|
108
|
-
crontab { "luke":
|
109
|
-
}
|
110
|
-
}
|
111
|
-
|
112
|
-
# XXX this doesn't work in the slightest
|
113
|
-
define crontab(name,path) {
|
114
|
-
usercrontab { "${path}/${name}":
|
115
|
-
}
|
116
|
-
}
|
data/examples/filerecursion
DELETED
data/examples/functions
DELETED
data/examples/groups
DELETED
data/examples/head
DELETED
@@ -1,30 +0,0 @@
|
|
1
|
-
# $Id$
|
2
|
-
|
3
|
-
# this file is responsible for importing all of the files we want to actually test
|
4
|
-
|
5
|
-
# these are all of the simple tests
|
6
|
-
import "simpletests"
|
7
|
-
import "assignments"
|
8
|
-
import "selectors"
|
9
|
-
#import "iftest"
|
10
|
-
import "importing"
|
11
|
-
import "execs"
|
12
|
-
import "filedefaults"
|
13
|
-
|
14
|
-
# facts are now imported into the top of the namespace
|
15
|
-
#import "facts"
|
16
|
-
|
17
|
-
# obsoleted
|
18
|
-
#import "functions"
|
19
|
-
|
20
|
-
# files we no longer need to import directly, or at all in some cases
|
21
|
-
#import "one"
|
22
|
-
#import "classing"
|
23
|
-
#import "components"
|
24
|
-
#import "file.bl"
|
25
|
-
#import "fileparsing.disabled"
|
26
|
-
#import "groups"
|
27
|
-
|
28
|
-
# this imports the more complex files
|
29
|
-
import "allatonce" # imports classing and components
|
30
|
-
import "nodes" # imports classing and components
|
data/examples/importing
DELETED
data/examples/mac_dscl.pp
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
#!/usr/bin/env puppet --debug --verbose --trace
|
2
|
-
#
|
3
|
-
# Jeff McCune: I use this for developing and testing the directory service
|
4
|
-
# provider.
|
5
|
-
|
6
|
-
User { provider => "directoryservice" }
|
7
|
-
Group { provider => "directoryservice" }
|
8
|
-
|
9
|
-
user {
|
10
|
-
"testgone":
|
11
|
-
ensure => absent,
|
12
|
-
uid => 550;
|
13
|
-
"testhere":
|
14
|
-
ensure => present,
|
15
|
-
password => "foobar",
|
16
|
-
shell => "/bin/bash",
|
17
|
-
uid => 551;
|
18
|
-
}
|
19
|
-
|
20
|
-
group {
|
21
|
-
"testgone":
|
22
|
-
ensure => absent,
|
23
|
-
gid => 550;
|
24
|
-
"testhere":
|
25
|
-
ensure => present,
|
26
|
-
gid => 551;
|
27
|
-
|
28
|
-
}
|
data/examples/mac_dscl_revert.pp
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
#!/usr/bin/env puppet --debug --verbose --trace
|
2
|
-
#
|
3
|
-
# Jeff McCune: I use this for developing and testing the directory service
|
4
|
-
# provider.
|
5
|
-
|
6
|
-
User { provider => "directoryservice" }
|
7
|
-
Group { provider => "directoryservice" }
|
8
|
-
|
9
|
-
user {
|
10
|
-
"testgone":
|
11
|
-
ensure => absent,
|
12
|
-
uid => 550;
|
13
|
-
"testhere":
|
14
|
-
ensure => absent,
|
15
|
-
uid => 551;
|
16
|
-
}
|
17
|
-
|
18
|
-
group {
|
19
|
-
"testgone":
|
20
|
-
ensure => absent,
|
21
|
-
gid => 550;
|
22
|
-
"testhere":
|
23
|
-
ensure => absent,
|
24
|
-
gid => 551;
|
25
|
-
|
26
|
-
}
|
data/examples/mac_pkgdmg.pp
DELETED
@@ -1,10 +0,0 @@
|
|
1
|
-
# Jeff McCune <jeff.mccune@northstarlabs.net>
|
2
|
-
# 2007-08-14
|
3
|
-
#
|
4
|
-
# Use:
|
5
|
-
# puppet --verbose --debug --modulepath=`pwd` ./sample-module.pp
|
6
|
-
#
|
7
|
-
# sample-module demonstrates the use of a custom language function
|
8
|
-
# included within the module bundle.
|
9
|
-
|
10
|
-
include sample_module
|
@@ -1,36 +0,0 @@
|
|
1
|
-
# Copyright (C) David Schmitt <david@schmitt.edv-bus.at>
|
2
|
-
# All rights reserved.
|
3
|
-
#
|
4
|
-
# Redistribution and use in source and binary forms, with or without
|
5
|
-
# modification, are permitted provided that the following conditions
|
6
|
-
# are met:
|
7
|
-
# 1. Redistributions of source code must retain the above copyright
|
8
|
-
# notice, this list of conditions and the following disclaimer.
|
9
|
-
# 2. Redistributions in binary form must reproduce the above copyright
|
10
|
-
# notice, this list of conditions and the following disclaimer in the
|
11
|
-
# documentation and/or other materials provided with the distribution.
|
12
|
-
# 3. Neither the name of the Author nor the names of its contributors
|
13
|
-
# may be used to endorse or promote products derived from this software
|
14
|
-
# without specific prior written permission.
|
15
|
-
#
|
16
|
-
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
17
|
-
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
18
|
-
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
19
|
-
# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
20
|
-
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
21
|
-
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
22
|
-
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
23
|
-
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
24
|
-
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
25
|
-
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
26
|
-
# SUCH DAMAGE.
|
27
|
-
|
28
|
-
# Jeff McCune <jeff.mccune@northstarlabs.net>
|
29
|
-
# 2007-08-14
|
30
|
-
# See: http://docs.puppetlabs.com/guides/custom_functions.html
|
31
|
-
|
32
|
-
module Puppet::Parser::Functions
|
33
|
-
newfunction(:hostname_to_dn, :type => :rvalue, :doc => "Given 'foo.bar.com', return 'dc=foo,dc=bar,dc=com'.") do |args|
|
34
|
-
args[0].split(/\./).map do |s| "dc=#{s}" end.join(",")
|
35
|
-
end
|
36
|
-
end
|
@@ -1,12 +0,0 @@
|
|
1
|
-
# Jeff McCune <jeff.mccune@northstarlabs.net>
|
2
|
-
#
|
3
|
-
# Demonstration of a custom parser function and erb template within
|
4
|
-
# a module, working in concert.
|
5
|
-
|
6
|
-
class sample_module {
|
7
|
-
$fqdn_to_dn = hostname_to_dn($domain)
|
8
|
-
$sample_template = template("sample-module/sample.erb")
|
9
|
-
|
10
|
-
notice("hostname_to_dn module function returned: [$fqdn_to_dn]")
|
11
|
-
info("sample.erb looks like:\n$sample_template")
|
12
|
-
}
|
data/examples/nodes
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
# $Id$
|
2
|
-
|
3
|
-
# define nodes
|
4
|
-
|
5
|
-
#service.setpath("../examples/root/etc/init.d")
|
6
|
-
|
7
|
-
Service {
|
8
|
-
path => "../examples/root/etc/init.d"
|
9
|
-
}
|
10
|
-
|
11
|
-
import "classing"
|
12
|
-
|
13
|
-
sleepserver {
|
14
|
-
path => $operatingsystem ? {
|
15
|
-
sunos => "../examples/root/etc/configfile",
|
16
|
-
hpux => "../examples/other/etc/configfile",
|
17
|
-
default => "../examples/root/etc/configfile"
|
18
|
-
},
|
19
|
-
schedule => true
|
20
|
-
}
|
data/examples/one
DELETED
data/examples/relationships
DELETED
@@ -1,34 +0,0 @@
|
|
1
|
-
# $Id$
|
2
|
-
|
3
|
-
#service.setpath("../examples/root/etc/init.d")
|
4
|
-
#puppet.statefile("/tmp/puppetstate")
|
5
|
-
$path = "../examples/root/etc/configfile"
|
6
|
-
path => "../examples/root/etc/init.d"
|
7
|
-
|
8
|
-
|
9
|
-
define files {
|
10
|
-
file { "/tmp/yaytest":
|
11
|
-
ensure => file,
|
12
|
-
mode => 755
|
13
|
-
}
|
14
|
-
file { "/tmp/exists":
|
15
|
-
checksum => md5
|
16
|
-
}
|
17
|
-
}
|
18
|
-
|
19
|
-
define sleeper {
|
20
|
-
file { $path:
|
21
|
-
mode => 755
|
22
|
-
}
|
23
|
-
service { sleeper:
|
24
|
-
path => "../examples/root/etc/init.d",
|
25
|
-
running => 1
|
26
|
-
}
|
27
|
-
}
|
28
|
-
|
29
|
-
files { }
|
30
|
-
|
31
|
-
sleeper {
|
32
|
-
require => files["yay"],
|
33
|
-
schedule => true
|
34
|
-
}
|
data/examples/selectors
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
# $Id$
|
2
|
-
#
|
3
|
-
|
4
|
-
$platform = SunOS
|
5
|
-
|
6
|
-
$funtest = $platform ? {
|
7
|
-
SunOS => yayness,
|
8
|
-
AIX => goodness,
|
9
|
-
default => badness
|
10
|
-
}
|
11
|
-
|
12
|
-
# this is a comment
|
13
|
-
|
14
|
-
$filename = "/tmp/yayness"
|
15
|
-
|
16
|
-
$sleeper = file { $filename:
|
17
|
-
mode => $platform ? {
|
18
|
-
SunOS => 644,
|
19
|
-
default => 755
|
20
|
-
},
|
21
|
-
create => $platform ? "SunOS" => true
|
22
|
-
}
|
23
|
-
|
24
|
-
# i guess it has to be solved this way...
|
25
|
-
|
26
|
-
#$platform ? sunos => file { $filename:
|
27
|
-
# mode => 644
|
28
|
-
#}
|
data/examples/simpletests
DELETED
data/examples/svncommit
DELETED