puppet 0.24.4 → 0.24.5
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/CHANGELOG +170 -0
- data/Rakefile +6 -4
- data/bin/filebucket +3 -2
- data/bin/puppet +7 -4
- data/bin/puppetca +32 -14
- data/bin/puppetd +12 -34
- data/bin/puppetmasterd +3 -2
- data/bin/puppetrun +5 -43
- data/bin/ralsh +2 -2
- data/conf/debian/README.source +2 -0
- data/conf/debian/TODO.Debian +1 -0
- data/conf/debian/changelog +257 -0
- data/conf/debian/compat +1 -0
- data/conf/debian/control +45 -0
- data/conf/debian/copyright +17 -0
- data/conf/debian/docs +1 -0
- data/conf/debian/fileserver.conf +12 -0
- data/conf/debian/puppet.NEWS +63 -0
- data/conf/debian/puppet.conf +8 -0
- data/conf/debian/puppet.dirs +7 -0
- data/conf/debian/puppet.files +6 -0
- data/conf/debian/puppet.init +64 -0
- data/conf/debian/puppet.logrotate +11 -0
- data/conf/debian/puppet.postinst +9 -0
- data/conf/debian/puppet.postrm +21 -0
- data/conf/debian/puppet.preinst +25 -0
- data/conf/debian/puppetmaster.files +4 -0
- data/conf/debian/puppetmaster.init +58 -0
- data/conf/debian/rules +115 -0
- data/conf/debian/watch +2 -0
- data/conf/gentoo/init.d/puppet +1 -1
- data/conf/gentoo/init.d/puppetmaster +32 -31
- data/conf/redhat/client.init +10 -2
- data/conf/redhat/puppet.spec +4 -1
- data/conf/redhat/server.init +9 -1
- data/examples/{code/allatonce → allatonce} +0 -0
- data/examples/{code/assignments → assignments} +0 -0
- data/examples/{code/components → components} +0 -0
- data/examples/{root/etc → etc}/init.d/sleeper +0 -0
- data/examples/{root/etc → etc}/otherfile +0 -0
- data/examples/{root/etc → etc}/puppet/fileserver.conf +0 -0
- data/examples/{root/etc → etc}/puppet/namespaceauth.conf +0 -0
- data/examples/{root/etc → etc}/puppet/puppet.conf +0 -0
- data/examples/{root/etc → etc}/puppet/tagmail.conf +0 -0
- data/examples/{code/execs → execs} +0 -0
- data/examples/{code/file.bl → file.bl} +0 -0
- data/examples/{code/filedefaults → filedefaults} +0 -0
- data/examples/{code/fileparsing → fileparsing} +0 -0
- data/examples/{code/filerecursion → filerecursion} +0 -0
- data/examples/{code/functions → functions} +0 -0
- data/examples/{code/groups → groups} +0 -0
- data/examples/{code/head → head} +0 -0
- data/examples/{code/importing → importing} +0 -0
- data/examples/{code/mac_automount.pp → mac_automount.pp} +0 -0
- data/examples/{code/mac_dscl.pp → mac_dscl.pp} +0 -0
- data/examples/{code/mac_dscl_revert.pp → mac_dscl_revert.pp} +0 -0
- data/examples/{code/mac_netinfo.pp → mac_netinfo.pp} +0 -0
- data/examples/{code/mac_pkgdmg.pp → mac_pkgdmg.pp} +0 -0
- data/examples/{code/modules → modules}/sample-module.pp +0 -0
- data/examples/{code/modules → modules}/sample-module/README.txt +0 -0
- data/examples/{code/modules → modules}/sample-module/lib/puppet/parser/functions/hostname_to_dn.rb +0 -0
- data/examples/{code/modules → modules}/sample-module/manifests/init.pp +0 -0
- data/examples/{code/modules → modules}/sample-module/templates/sample.erb +0 -0
- data/examples/{code/nodes → nodes} +0 -0
- data/examples/{code/one → one} +0 -0
- data/examples/{code/relationships → relationships} +0 -0
- data/examples/{code/selectors → selectors} +0 -0
- data/examples/{code/simpletests → simpletests} +0 -0
- data/examples/{code/svncommit → svncommit} +0 -0
- data/ext/autotest/Rakefile +8 -0
- data/ext/autotest/config +43 -0
- data/ext/autotest/readme.rst +16 -0
- data/{examples/root → ext}/bin/sleeper +1 -1
- data/ext/emacs/puppet-mode.el +246 -184
- data/ext/ldap/puppet.schema +7 -2
- data/ext/module_puppet +4 -3
- data/ext/nagios/check_puppet.rb +117 -0
- data/ext/puppetlast +40 -0
- data/install.rb +12 -3
- data/lib/puppet.rb +1 -44
- data/lib/puppet/defaults.rb +23 -10
- data/lib/puppet/dsl.rb +2 -2
- data/lib/puppet/executables/client/certhandler.rb +77 -0
- data/lib/puppet/external/nagios.rb +1 -1
- data/lib/puppet/external/nagios/base.rb +60 -46
- data/lib/puppet/file_serving/indirection_hooks.rb +4 -2
- data/lib/puppet/file_serving/metadata.rb +0 -9
- data/lib/puppet/file_serving/terminus_helper.rb +4 -4
- data/lib/puppet/indirector.rb +26 -28
- data/lib/puppet/indirector/catalog/compiler.rb +6 -28
- data/lib/puppet/indirector/checksum/file.rb +2 -2
- data/lib/puppet/indirector/direct_file_server.rb +7 -7
- data/lib/puppet/indirector/envelope.rb +13 -0
- data/lib/puppet/indirector/exec.rb +2 -2
- data/lib/puppet/indirector/facts/facter.rb +2 -2
- data/lib/puppet/indirector/file.rb +17 -14
- data/lib/puppet/indirector/file_metadata/file.rb +2 -2
- data/lib/puppet/indirector/file_server.rb +14 -14
- data/lib/puppet/indirector/indirection.rb +113 -48
- data/lib/puppet/indirector/ldap.rb +13 -25
- data/lib/puppet/indirector/memory.rb +7 -7
- data/lib/puppet/indirector/module_files.rb +14 -14
- data/lib/puppet/indirector/node/exec.rb +3 -10
- data/lib/puppet/indirector/node/ldap.rb +138 -41
- data/lib/puppet/indirector/node/plain.rb +1 -8
- data/lib/puppet/indirector/node/rest.rb +1 -1
- data/lib/puppet/indirector/plain.rb +2 -2
- data/lib/puppet/indirector/report/processor.rb +2 -2
- data/lib/puppet/indirector/request.rb +42 -0
- data/lib/puppet/indirector/rest.rb +51 -3
- data/lib/puppet/indirector/terminus.rb +0 -27
- data/lib/puppet/indirector/yaml.rb +12 -17
- data/lib/puppet/metatype/attributes.rb +3 -7
- data/lib/puppet/metatype/evaluation.rb +2 -2
- data/lib/puppet/module.rb +6 -2
- data/lib/puppet/network/client/master.rb +29 -81
- data/lib/puppet/network/handler/master.rb +12 -43
- data/lib/puppet/network/http.rb +8 -6
- data/lib/puppet/network/http/handler.rb +42 -32
- data/lib/puppet/network/http/mongrel.rb +8 -9
- data/lib/puppet/network/http/mongrel/rest.rb +42 -15
- data/lib/puppet/network/http/webrick.rb +27 -16
- data/lib/puppet/network/http/webrick/rest.rb +38 -14
- data/lib/puppet/network/http_pool.rb +3 -2
- data/lib/puppet/network/server.rb +24 -22
- data/lib/puppet/network/xmlrpc/client.rb +6 -1
- data/lib/puppet/node.rb +38 -79
- data/lib/puppet/node/catalog.rb +9 -0
- data/lib/puppet/node/facts.rb +9 -1
- data/lib/puppet/parser/ast/function.rb +1 -1
- data/lib/puppet/parser/collector.rb +6 -0
- data/lib/puppet/parser/compiler.rb +1 -1
- data/lib/puppet/parser/functions.rb +25 -1
- data/lib/puppet/parser/interpreter.rb +2 -17
- data/lib/puppet/parser/parser.rb +4 -4
- data/lib/puppet/parser/parser_support.rb +6 -2
- data/lib/puppet/parser/resource.rb +6 -0
- data/lib/puppet/parser/templatewrapper.rb +9 -0
- data/lib/puppet/pgraph.rb +1 -1
- data/lib/puppet/property.rb +0 -1
- data/lib/puppet/provider.rb +9 -95
- data/lib/puppet/provider/confine.rb +77 -0
- data/lib/puppet/provider/confine/exists.rb +22 -0
- data/lib/puppet/provider/confine/false.rb +19 -0
- data/lib/puppet/provider/confine/feature.rb +17 -0
- data/lib/puppet/provider/confine/true.rb +20 -0
- data/lib/puppet/provider/confine/variable.rb +42 -0
- data/lib/puppet/provider/confine_collection.rb +47 -0
- data/lib/puppet/provider/confiner.rb +20 -0
- data/lib/puppet/provider/cron/crontab.rb +6 -2
- data/lib/puppet/provider/group/groupadd.rb +1 -1
- data/lib/puppet/provider/group/ldap.rb +48 -0
- data/lib/puppet/provider/ldap.rb +137 -0
- data/lib/puppet/provider/nameservice.rb +1 -2
- data/lib/puppet/provider/nameservice/objectadd.rb +2 -5
- data/lib/puppet/provider/package/dpkg.rb +16 -1
- data/lib/puppet/provider/package/freebsd.rb +15 -4
- data/lib/puppet/provider/package/gem.rb +33 -12
- data/lib/puppet/provider/package/pkgdmg.rb +1 -60
- data/lib/puppet/provider/package/ports.rb +6 -1
- data/lib/puppet/provider/package/rpm.rb +14 -13
- data/lib/puppet/provider/package/urpmi.rb +3 -3
- data/lib/puppet/provider/service/base.rb +4 -4
- data/lib/puppet/provider/service/debian.rb +1 -1
- data/lib/puppet/provider/service/init.rb +5 -3
- data/lib/puppet/provider/service/redhat.rb +35 -7
- data/lib/puppet/provider/ssh_authorized_key/parsed.rb +69 -0
- data/lib/puppet/provider/user/ldap.rb +133 -0
- data/lib/puppet/provider/user/useradd.rb +1 -1
- data/lib/puppet/rails/database/001_add_created_at_to_all_tables.rb +14 -14
- data/lib/puppet/rails/database/schema.rb +9 -0
- data/lib/puppet/rails/resource.rb +1 -0
- data/lib/puppet/reference/providers.rb +8 -2
- data/lib/puppet/reference/report.rb +23 -0
- data/lib/puppet/reports/rrdgraph.rb +4 -2
- data/lib/puppet/sslcertificates/ca.rb +9 -4
- data/lib/puppet/sslcertificates/support.rb +26 -2
- data/lib/puppet/transaction.rb +11 -16
- data/lib/puppet/transaction/change.rb +94 -0
- data/lib/puppet/transaction/event.rb +21 -0
- data/lib/puppet/transaction/report.rb +4 -0
- data/lib/puppet/type.rb +0 -2
- data/lib/puppet/type/file/ensure.rb +0 -5
- data/lib/puppet/type/file/group.rb +13 -7
- data/lib/puppet/type/file/source.rb +8 -15
- data/lib/puppet/type/file/target.rb +2 -0
- data/lib/puppet/type/group.rb +1 -1
- data/lib/puppet/type/mount.rb +4 -2
- data/lib/puppet/type/nagios_hostescalation.rb +3 -0
- data/lib/puppet/type/nagios_servicegroup.rb +3 -0
- data/lib/puppet/type/ssh_authorized_key.rb +56 -0
- data/lib/puppet/type/user.rb +3 -0
- data/lib/puppet/type/yumrepo.rb +0 -1
- data/lib/puppet/util.rb +1 -1
- data/lib/puppet/util/ldap.rb +5 -0
- data/lib/puppet/util/ldap/connection.rb +69 -0
- data/lib/puppet/util/ldap/generator.rb +45 -0
- data/lib/puppet/util/ldap/manager.rb +281 -0
- data/lib/puppet/util/posix.rb +2 -2
- data/lib/puppet/util/resource_template.rb +61 -0
- data/lib/puppet/util/settings.rb +63 -3
- data/lib/puppet/util/storage.rb +4 -0
- data/lib/puppet/util/warnings.rb +7 -0
- data/man/man8/filebucket.8 +116 -0
- data/man/man8/pi.8 +34 -0
- data/man/man8/puppet.8 +78 -0
- data/man/man8/puppet.conf.8 +1747 -0
- data/man/man8/puppetca.8 +118 -0
- data/man/man8/puppetd.8 +184 -0
- data/man/man8/puppetdoc.8 +62 -0
- data/man/man8/puppetmasterd.8 +87 -0
- data/man/man8/puppetrun.8 +151 -0
- data/man/man8/ralsh.8 +135 -0
- data/test/README +24 -0
- data/test/certmgr/support.rb +28 -1
- data/test/data/failers/badclassnoparam +10 -0
- data/test/data/failers/badclassparam +10 -0
- data/test/data/failers/badcompnoparam +9 -0
- data/test/data/failers/badcompparam +9 -0
- data/test/data/failers/badtypeparam +3 -0
- data/test/data/failers/noobjectrvalue +1 -0
- data/test/data/providers/cron/crontab.allthree +17 -0
- data/test/data/providers/cron/crontab.envNcomment +12 -0
- data/test/data/providers/cron/crontab.envNname +11 -0
- data/test/data/providers/cron/crontab.multirecords +12 -0
- data/test/data/providers/cron/crontab_collections.yaml +44 -0
- data/test/data/providers/cron/crontab_multiple_with_env.yaml +54 -0
- data/test/data/providers/cron/crontab_sample_records.yaml +272 -0
- data/test/data/providers/cron/examples/freebsd +2 -0
- data/test/data/providers/cron/examples/one +14 -0
- data/test/data/providers/cron/examples/openbsd +20 -0
- data/test/data/providers/package/testpackages.yaml +65 -0
- data/test/data/providers/ssh_authorized_key/parsed/authorized_keys +5 -0
- data/test/data/reports/1.yaml +108 -0
- data/test/data/reports/2.yaml +108 -0
- data/test/data/reports/tagmail_failers.conf +3 -0
- data/test/data/reports/tagmail_passers.conf +30 -0
- data/test/data/snippets/aliastest.pp +16 -0
- data/test/data/snippets/argumentdefaults +14 -0
- data/test/data/snippets/casestatement.pp +58 -0
- data/test/data/snippets/classheirarchy.pp +15 -0
- data/test/data/snippets/classincludes.pp +17 -0
- data/test/data/snippets/classpathtest +11 -0
- data/test/data/snippets/collection.pp +10 -0
- data/test/data/snippets/collection_within_virtual_definitions.pp +20 -0
- data/test/data/snippets/componentmetaparams.pp +11 -0
- data/test/data/snippets/componentrequire.pp +8 -0
- data/test/data/snippets/deepclassheirarchy.pp +23 -0
- data/test/data/snippets/defineoverrides.pp +17 -0
- data/test/data/snippets/emptyclass.pp +9 -0
- data/test/data/snippets/emptyexec.pp +3 -0
- data/test/data/snippets/falsevalues.pp +3 -0
- data/test/data/snippets/filecreate +11 -0
- data/test/data/snippets/fqdefinition.pp +5 -0
- data/test/data/snippets/fqparents.pp +11 -0
- data/test/data/snippets/implicititeration +15 -0
- data/test/data/snippets/multipleinstances +7 -0
- data/test/data/snippets/multisubs.pp +13 -0
- data/test/data/snippets/namevartest +9 -0
- data/test/data/snippets/scopetest +13 -0
- data/test/data/snippets/selectorvalues.pp +42 -0
- data/test/data/snippets/simpledefaults +5 -0
- data/test/data/snippets/simpleselector +38 -0
- data/test/data/snippets/singleary.pp +19 -0
- data/test/data/snippets/singlequote.pp +11 -0
- data/test/data/snippets/singleselector.pp +22 -0
- data/test/data/snippets/subclass_name_duplication.pp +11 -0
- data/test/data/snippets/tag.pp +9 -0
- data/test/data/snippets/tagged.pp +35 -0
- data/test/data/snippets/virtualresources.pp +14 -0
- data/test/data/types/hosts/1 +3 -0
- data/test/data/types/hosts/2 +13 -0
- data/test/data/types/hosts/solaris +5 -0
- data/test/data/types/mailalias/file1 +183 -0
- data/test/data/types/mount/freebsd.fstab +7 -0
- data/test/data/types/mount/linux.fstab +11 -0
- data/test/data/types/mount/solaris.fstab +11 -0
- data/test/data/types/port/1 +533 -0
- data/test/data/types/port/darwin +11866 -0
- data/test/data/types/ssh_authorized_key/1 +2 -0
- data/test/data/types/sshkey/1 +21 -0
- data/test/data/types/yumrepos/fedora-devel.repo +26 -0
- data/test/data/types/yumrepos/fedora.repo +9 -0
- data/test/language/parser.rb +8 -1
- data/test/lib/puppettest/runnable_test.rb +3 -0
- data/test/lib/puppettest/support/utils.rb +1 -1
- data/test/lib/rake/puppet_testtask.rb +3 -0
- data/test/lib/stubba.rb +1 -1
- data/test/network/client/ca.rb +1 -0
- data/test/network/client/master.rb +13 -127
- data/test/network/handler/master.rb +61 -80
- data/test/other/provider.rb +0 -45
- data/test/other/transactions.rb +53 -15
- data/test/rails/host.rb +0 -37
- data/test/ral/providers/cron/crontab.rb +32 -3
- data/test/ral/providers/provider.rb +28 -7
- data/test/ral/type/filesources.rb +2 -18
- data/test/ral/type/sshkey.rb +0 -1
- data/test/ral/type/user.rb +6 -0
- data/test/test +241 -0
- metadata +289 -113
- data/examples/root/etc/configfile +0 -0
- data/examples/root/etc/debian-passwd +0 -29
- data/examples/root/etc/debian-syslog.conf +0 -71
- data/lib/puppet/event.rb +0 -28
- data/lib/puppet/network/handler/configuration.rb +0 -184
- data/lib/puppet/network/http/mongrel/xmlrpc.rb +0 -4
- data/lib/puppet/network/http/webrick/xmlrpc.rb +0 -4
- data/lib/puppet/propertychange.rb +0 -141
- data/lib/puppet/provider/interface/redhat.rb +0 -250
- data/lib/puppet/provider/interface/sunos.rb +0 -133
- data/lib/puppet/type/interface.rb +0 -60
- data/lib/puppet/util/variables.rb +0 -38
- data/test/network/handler/configuration.rb +0 -160
- data/test/other/propertychange.rb +0 -140
- data/test/util/loadedfile.rb +0 -121
data/CHANGELOG
CHANGED
@@ -1,3 +1,173 @@
|
|
1
|
+
0.24.5
|
2
|
+
You can now select the encoding format when transferring the catalog,
|
3
|
+
with 'yaml' still being the default but 'marshal' being an option.
|
4
|
+
This is because testing has shown drastic performance differences
|
5
|
+
between the two, with up to 70% of compile time being spent
|
6
|
+
in YAML code. Use the 'catalog_format' setting to choose your format,
|
7
|
+
and the setting must be set on the client.
|
8
|
+
|
9
|
+
Fixed #1431 - Provider confines must now specify similar tests in one call.
|
10
|
+
I.e., you can't do confine :operatingsystem => %w{a b} and then
|
11
|
+
confine :operatingsystem => %w{b c}; you'd need to do them in one command.
|
12
|
+
This now-obsolete behaviour does not seem to be used anywhere.
|
13
|
+
The fix for #1431 is actually just removing the tests that exposed
|
14
|
+
this change; the change happened when I refactored how confines work.
|
15
|
+
|
16
|
+
Updated /spec/unit/rails.rb test
|
17
|
+
|
18
|
+
Fix #1426 - services on redhat are restarted again and status is
|
19
|
+
called from the Red Hat provider
|
20
|
+
|
21
|
+
Fixed #1414 - Return code from waitpid now right shifted 8 bits
|
22
|
+
|
23
|
+
Fixed #174 - a native type type for managing ssh authorized_keys
|
24
|
+
files is available.
|
25
|
+
|
26
|
+
Further moves from the examples directory and ext directory
|
27
|
+
|
28
|
+
Fixed #1397 One line fix, fail instead of log
|
29
|
+
|
30
|
+
Moved debian to conf and updated examples directory
|
31
|
+
|
32
|
+
Fixed #1368 - updated Red Hat init scripts
|
33
|
+
|
34
|
+
Added message referencing ReductiveLabs build library
|
35
|
+
|
36
|
+
Fixed #1396 - Added sha1 function from DavidS to core
|
37
|
+
|
38
|
+
Fixed #1399 - the ldap user provider now knows it can manage
|
39
|
+
passwords.
|
40
|
+
|
41
|
+
Fixed #1272 - if you provide a group name as the gid to an ldap
|
42
|
+
user, the name will be converted to a gid. Note that this only
|
43
|
+
looks up ldap groups, at this point; if you want to set an ldap
|
44
|
+
user's primary group to a local group, you have to specify the GID.
|
45
|
+
|
46
|
+
Fixed #1226 - gems can now specify source repositories.
|
47
|
+
|
48
|
+
Fixed #1232 - the rundir no longer specifies a user/group,
|
49
|
+
and there are now client- and server-specific yaml directories.
|
50
|
+
|
51
|
+
Fixed 1240 - puppet will function more like puppetd if graphing
|
52
|
+
or reporting are enabled.
|
53
|
+
|
54
|
+
Fixed #1231 - Exceptions during initialization should now be clearer.
|
55
|
+
|
56
|
+
Fixed #1006 - puppetrun --class works again. I added the class
|
57
|
+
membership testing to the Ldap node terminus, and added tests,
|
58
|
+
so it shouldn't break again.
|
59
|
+
|
60
|
+
Fixed #1114 - Facts in plugin directories should now be autoloaded,
|
61
|
+
as long as you're using Facter 1.5.
|
62
|
+
|
63
|
+
Fixed #1195 - Updated Gentoo init scripts
|
64
|
+
|
65
|
+
Fixed #1367 - Updated Rakefile for new daily builds
|
66
|
+
|
67
|
+
Fixed #1370 - removed test/util/loadedfile.rb tests
|
68
|
+
|
69
|
+
Fixed #1221 - aliases to titles now work for resources.
|
70
|
+
|
71
|
+
Fixed #1012 - templates in the templatedir are preferred to module templates.
|
72
|
+
|
73
|
+
Fixed #707 - special '@reboot'-style cron jobs work again.
|
74
|
+
|
75
|
+
Fixed #1360 - allowdupe works on groups again.
|
76
|
+
|
77
|
+
Fixed #1369 - the init service provider now supports HP-UX.
|
78
|
+
|
79
|
+
Removed support for the 'node_name' setting in LDAP and external node
|
80
|
+
lookups.
|
81
|
+
|
82
|
+
Also removed support for 'default' nodes in external nodes.
|
83
|
+
LDAP nodes now use the certificate name, the short name, and 'default',
|
84
|
+
but external nodes just use the certificate name and any custom terminus
|
85
|
+
types will use just the certificate name.
|
86
|
+
|
87
|
+
Fixing #1168 (for 0.24.x) -- automatically downcasing the fqdn.
|
88
|
+
Also requiring that passed in certnames be downcased; the setting
|
89
|
+
system isn't currently flexible enough to automatically downcase
|
90
|
+
it for the user.
|
91
|
+
|
92
|
+
Adding a ResourceTemplate class for using templates directly
|
93
|
+
within resources (i.e., client-side templates). This would really
|
94
|
+
only be used for composite resources that pass the results of the
|
95
|
+
template on to generated resources.
|
96
|
+
|
97
|
+
Exporting or collecting resources no longer raises an exception
|
98
|
+
when no storeconfigs is enabled, it just produces a warning.
|
99
|
+
|
100
|
+
Always using the cert name to store yaml files, which fixes #1178.
|
101
|
+
The Master handler previously provided the support for the :node_name
|
102
|
+
setting, and that functionality has now been moved into the Node
|
103
|
+
class. At the same time, the names to search through have been
|
104
|
+
changed somewhat: Previously, the certificate name and the
|
105
|
+
hostname were both used for searching, but now, the cert name
|
106
|
+
is always searched first (unless node_name == facter), but only
|
107
|
+
the Facter hostname, domain, and fqdn are used otherwise. We no
|
108
|
+
longer split the cert name, only the hostname/domain/fqdn.
|
109
|
+
|
110
|
+
Fixing transaction support for prefetching generated resources.
|
111
|
+
|
112
|
+
Adding support for settings within the existing Facter provider confines.
|
113
|
+
|
114
|
+
Moving all confine code out of the Provider class, and fixing #1197.
|
115
|
+
Created a Confiner module for the Provider class methods, enhanced
|
116
|
+
the interface between it and the Confine class to make sure binary
|
117
|
+
paths are searched for fresh each time.
|
118
|
+
|
119
|
+
Modified the 'factpath' setting to automatically configure
|
120
|
+
Facter to load facts there if a new enough version of
|
121
|
+
Facter is used.
|
122
|
+
|
123
|
+
Crontab provider: fix a parse error when a line begins with a space
|
124
|
+
character (fixes #1216)
|
125
|
+
|
126
|
+
Instead of deleting the init scripts (with --del) we should simply
|
127
|
+
disable it with chkconfig service off, and respectfully do the same
|
128
|
+
for enable => true;
|
129
|
+
|
130
|
+
Added ldap providers for users and groups.
|
131
|
+
|
132
|
+
Added support for the --all option to puppetca --clean. If
|
133
|
+
puppetca --clean --all is issued then all client certificates
|
134
|
+
are removed.
|
135
|
+
|
136
|
+
Resources now return the 'should' value for properties from
|
137
|
+
the [] accessor method (they previously threw an exception when
|
138
|
+
this method was used with properties). This shouldn't have any
|
139
|
+
affect functionally; it just makes the method equivalent to 'should'
|
140
|
+
for properties, but it works for all attribute types now.
|
141
|
+
|
142
|
+
Modified the 'master' handler to use the Catalog class to
|
143
|
+
compile node configurations, rather than using the Configuration
|
144
|
+
handler, which was never used directly. I removed the Configuration
|
145
|
+
handler as a result.
|
146
|
+
|
147
|
+
Modified the 'master' handler (responsible for sending configurations
|
148
|
+
to clients) to always return Time.now as its compile date, so
|
149
|
+
configurations will always get recompiled.
|
150
|
+
|
151
|
+
Fixed #1184 -- definitions now autoload correctly all of the time.
|
152
|
+
|
153
|
+
Removed the code from the client that tries to avoid recompiling
|
154
|
+
the catalog. The client will now always recompile, assuming it
|
155
|
+
can reach the server. It will still use the cached config if
|
156
|
+
there's a failure.
|
157
|
+
|
158
|
+
Fixing #1173 -- classes and definitions can now have the same
|
159
|
+
name as a directory with no failures.
|
160
|
+
|
161
|
+
Saving new facts now expires any cached node information.
|
162
|
+
|
163
|
+
Switching how caching is handled, so that objects now all
|
164
|
+
have an expiration date associated with them. This makes it
|
165
|
+
much easier to know whether a given cached object should be used
|
166
|
+
or if it should be regenerated.
|
167
|
+
|
168
|
+
Changing the default environment to production.
|
169
|
+
|
170
|
+
0.24.4
|
1
171
|
Pass source to pkg_add via the PKG_PATH environment variable if
|
2
172
|
it ends in a '/' indicating it is a directory. Allows pkg_add
|
3
173
|
to resolve dependancies, and make it possible to specify packages
|
data/Rakefile
CHANGED
@@ -5,7 +5,7 @@ $: << File.expand_path(File.join(File.dirname(__FILE__), 'lib'))
|
|
5
5
|
begin
|
6
6
|
require 'rake/reductive'
|
7
7
|
rescue LoadError
|
8
|
-
$stderr.puts "You must have the Reductive build library in your RUBYLIB."
|
8
|
+
$stderr.puts "You must have the Reductive build library in your RUBYLIB; see http://github.com/lak/reductive-build/tree/master."
|
9
9
|
exit(14)
|
10
10
|
end
|
11
11
|
|
@@ -23,11 +23,12 @@ project = Rake::RedLabProject.new("puppet") do |p|
|
|
23
23
|
'lib/puppet.rb',
|
24
24
|
'lib/puppet/**/*.rb',
|
25
25
|
'lib/puppet/**/*.py',
|
26
|
-
'test
|
26
|
+
'test/**/*',
|
27
27
|
'bin/**/*',
|
28
28
|
'ext/**/*',
|
29
29
|
'examples/**/*',
|
30
|
-
'conf/**/*'
|
30
|
+
'conf/**/*',
|
31
|
+
'man/**/*'
|
31
32
|
]
|
32
33
|
p.filelist.exclude("bin/pi")
|
33
34
|
|
@@ -59,6 +60,7 @@ if project.has?(:gem)
|
|
59
60
|
'--main' << 'README' <<
|
60
61
|
'--line-numbers'
|
61
62
|
task.test_file = "test/Rakefile"
|
63
|
+
task.author = "Luke Kanies"
|
62
64
|
end
|
63
65
|
end
|
64
66
|
|
@@ -101,7 +103,7 @@ def daily(package)
|
|
101
103
|
edir = "/tmp/daily-export"
|
102
104
|
Dir.mkdir edir
|
103
105
|
Dir.chdir(edir) do
|
104
|
-
sh %{
|
106
|
+
sh %{git clone git://reductivelabs.com/#{package} #{package} >/dev/null}
|
105
107
|
sh %{tar cf - #{package} | gzip -c > #{dailyfile(package)}}
|
106
108
|
end
|
107
109
|
FileUtils.rm_rf(edir)
|
data/bin/filebucket
CHANGED
@@ -163,8 +163,9 @@ end
|
|
163
163
|
# Now parse the config
|
164
164
|
Puppet.parse_config
|
165
165
|
|
166
|
-
Puppet.
|
167
|
-
Puppet.
|
166
|
+
if Puppet.settings.print_configs?
|
167
|
+
exit(Puppet.settings.print_configs ? 0 : 1)
|
168
|
+
end
|
168
169
|
|
169
170
|
begin
|
170
171
|
if options[:local] or options[:bucket]
|
data/bin/puppet
CHANGED
@@ -141,8 +141,9 @@ if Puppet[:config] and File.exists? Puppet[:config]
|
|
141
141
|
Puppet.settings.parse(Puppet[:config])
|
142
142
|
end
|
143
143
|
|
144
|
-
Puppet.
|
145
|
-
Puppet.
|
144
|
+
if Puppet.settings.print_configs?
|
145
|
+
exit(Puppet.settings.print_configs ? 0 : 1)
|
146
|
+
end
|
146
147
|
|
147
148
|
# If noop is set, then also enable diffs
|
148
149
|
if Puppet[:noop]
|
@@ -186,7 +187,7 @@ facts = Puppet::Node::Facts.find("me")
|
|
186
187
|
facts.name = facts.values["hostname"]
|
187
188
|
|
188
189
|
# Find our Node
|
189
|
-
node = Puppet::Node.
|
190
|
+
node = Puppet::Node.find(facts.name)
|
190
191
|
|
191
192
|
# Merge in the facts.
|
192
193
|
node.merge(facts.values)
|
@@ -206,11 +207,13 @@ end
|
|
206
207
|
|
207
208
|
begin
|
208
209
|
# Compile our catalog
|
209
|
-
catalog = Puppet::Node::Catalog.find(node)
|
210
|
+
catalog = Puppet::Node::Catalog.find(node.name, :use_node => node)
|
210
211
|
|
211
212
|
# Translate it to a RAL catalog
|
212
213
|
catalog = catalog.to_ral
|
213
214
|
|
215
|
+
catalog.host_config = true if Puppet[:graph] or Puppet[:report]
|
216
|
+
|
214
217
|
catalog.finalize
|
215
218
|
|
216
219
|
# And apply it
|
data/bin/puppetca
CHANGED
@@ -32,14 +32,16 @@
|
|
32
32
|
# '--genconfig'.
|
33
33
|
#
|
34
34
|
# all::
|
35
|
-
# Operate on all
|
36
|
-
# or '--list'.
|
35
|
+
# Operate on all items. Currently only makes sense with '--sign',
|
36
|
+
# '--clean', or '--list'.
|
37
37
|
#
|
38
38
|
# clean::
|
39
39
|
# Remove all files related to a host from puppetca's storage. This is
|
40
40
|
# useful when rebuilding hosts, since new certificate signing requests
|
41
41
|
# will only be honored if puppetca does not have a copy of a signed
|
42
42
|
# certificate for that host. The certificate of the host remains valid.
|
43
|
+
# If '--all' is specified then all host certificates, both signed and
|
44
|
+
# unsigned, will be removed.
|
43
45
|
#
|
44
46
|
# debug::
|
45
47
|
# Enable full debugging.
|
@@ -169,8 +171,9 @@ end
|
|
169
171
|
# Now parse the config
|
170
172
|
Puppet.parse_config
|
171
173
|
|
172
|
-
Puppet.
|
173
|
-
Puppet.
|
174
|
+
if Puppet.settings.print_configs?
|
175
|
+
exit(Puppet.settings.print_configs ? 0 : 1)
|
176
|
+
end
|
174
177
|
|
175
178
|
begin
|
176
179
|
ca = Puppet::SSLCertificates::CA.new()
|
@@ -213,20 +216,35 @@ when :list
|
|
213
216
|
puts ca.list_signed.collect { |cert | cert.sub(/^/,"+ ") }.join("\n")
|
214
217
|
end
|
215
218
|
when :clean
|
216
|
-
if hosts.empty?
|
217
|
-
$stderr.puts "You must specify one or more hosts to clean"
|
219
|
+
if hosts.empty? and all == false
|
220
|
+
$stderr.puts "You must specify one or more hosts to clean or --all to clean all host certificates"
|
218
221
|
exit(24)
|
219
222
|
end
|
223
|
+
|
220
224
|
cleaned = false
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
225
|
+
|
226
|
+
if all
|
227
|
+
certs = ca.list
|
228
|
+
if certs.empty?
|
229
|
+
$stderr.puts "No certificates to clean"
|
230
|
+
exit(24)
|
231
|
+
end
|
232
|
+
certs.each do |c|
|
233
|
+
ca.clean(c)
|
234
|
+
end
|
228
235
|
cleaned = true
|
236
|
+
else
|
237
|
+
hosts.each do |host|
|
238
|
+
cert = ca.getclientcert(host)[0]
|
239
|
+
if cert.nil?
|
240
|
+
$stderr.puts "Could not find client certificate for %s" % host
|
241
|
+
next
|
242
|
+
end
|
243
|
+
ca.clean(host)
|
244
|
+
cleaned = true
|
245
|
+
end
|
229
246
|
end
|
247
|
+
|
230
248
|
unless cleaned
|
231
249
|
exit(27)
|
232
250
|
end
|
@@ -234,7 +252,7 @@ when :sign
|
|
234
252
|
to_sign = ARGV.collect { |h| h.downcase }
|
235
253
|
unless to_sign.length > 0 or all
|
236
254
|
$stderr.puts(
|
237
|
-
"You must specify to sign
|
255
|
+
"You must specify one or more hosts to sign certificates for or --all to sign all certificates"
|
238
256
|
)
|
239
257
|
exit(24)
|
240
258
|
end
|
data/bin/puppetd
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
#
|
11
11
|
# puppetd [-D|--daemonize|--no-daemonize] [-d|--debug] [--disable] [--enable]
|
12
12
|
# [-h|--help] [--fqdn <host name>] [-l|--logdest syslog|<file>|console]
|
13
|
-
# [-o|--onetime] [--serve <handler>] [-t|--test]
|
13
|
+
# [-o|--onetime] [--serve <handler>] [-t|--test] [--noop]
|
14
14
|
# [-V|--version] [-v|--verbose] [-w|--waitforcert <seconds>]
|
15
15
|
#
|
16
16
|
# = Description
|
@@ -57,7 +57,7 @@
|
|
57
57
|
# parameter, so you can specify '--server <servername>' as an argument.
|
58
58
|
#
|
59
59
|
# See the configuration file documentation at
|
60
|
-
# http://reductivelabs.com/
|
60
|
+
# http://reductivelabs.com/trac/puppet/wiki/ConfigurationReference for
|
61
61
|
# the full list of acceptable parameters. A commented list of all
|
62
62
|
# configuration options can also be generated by running puppetd with
|
63
63
|
# '--genconfig'.
|
@@ -124,6 +124,10 @@
|
|
124
124
|
# Enable the most common options used for testing. These are +onetime+,
|
125
125
|
# +verbose+, +ignorecache, and +no-usecacheonfailure+.
|
126
126
|
#
|
127
|
+
# noop::
|
128
|
+
# Use +noop+ mode where the daemon runs in a no-op or dry-run mode. This is useful
|
129
|
+
# for seeing what changes Puppet will make without actually executing the changes.
|
130
|
+
#
|
127
131
|
# verbose::
|
128
132
|
# Turn on verbose reporting.
|
129
133
|
#
|
@@ -158,6 +162,7 @@ trap(:INT) do
|
|
158
162
|
end
|
159
163
|
|
160
164
|
require 'puppet'
|
165
|
+
require 'puppet/executables/client/certhandler'
|
161
166
|
require 'puppet/network/client'
|
162
167
|
require 'getoptlong'
|
163
168
|
|
@@ -294,8 +299,9 @@ unless options[:setdest]
|
|
294
299
|
Puppet::Util::Log.newdestination(:syslog)
|
295
300
|
end
|
296
301
|
|
297
|
-
Puppet.
|
298
|
-
Puppet.
|
302
|
+
if Puppet.settings.print_configs?
|
303
|
+
exit(Puppet.settings.print_configs ? 0 : 1)
|
304
|
+
end
|
299
305
|
|
300
306
|
# If noop is set, then also enable diffs
|
301
307
|
if Puppet[:noop]
|
@@ -338,36 +344,8 @@ if Puppet[:daemonize]
|
|
338
344
|
client.daemonize
|
339
345
|
end
|
340
346
|
|
341
|
-
unless Puppet::
|
342
|
-
|
343
|
-
# request one. Use the special ca stuff, don't use the normal server and port.
|
344
|
-
caclient = Puppet::Network::Client.ca.new()
|
345
|
-
if options[:waitforcert] > 0
|
346
|
-
begin
|
347
|
-
while ! caclient.request_cert do
|
348
|
-
Puppet.notice "Did not receive certificate"
|
349
|
-
sleep options[:waitforcert]
|
350
|
-
end
|
351
|
-
rescue => detail
|
352
|
-
Puppet.err "Could not request certificate: %s" % detail.to_s
|
353
|
-
exit(23)
|
354
|
-
end
|
355
|
-
else
|
356
|
-
unless caclient.request_cert
|
357
|
-
Puppet.notice "No certificates; exiting"
|
358
|
-
exit(1)
|
359
|
-
end
|
360
|
-
end
|
361
|
-
|
362
|
-
# Now read the new cert in.
|
363
|
-
if Puppet::Network::HttpPool.read_cert
|
364
|
-
# If we read it in, then get rid of our existing http connection.
|
365
|
-
client.recycle_connection
|
366
|
-
Puppet.notice "Got signed certificate"
|
367
|
-
else
|
368
|
-
Puppet.err "Could not read certificates after retrieving them"
|
369
|
-
exit(34)
|
370
|
-
end
|
347
|
+
unless Puppet::Executables::Client::CertHandler.new(options[:waitforcert], options[:onetime]).read_retrieve
|
348
|
+
client.recycle_connection
|
371
349
|
end
|
372
350
|
|
373
351
|
objects = []
|
data/bin/puppetmasterd
CHANGED
@@ -182,8 +182,9 @@ unless options[:setdest]
|
|
182
182
|
Puppet::Util::Log.newdestination(:syslog)
|
183
183
|
end
|
184
184
|
|
185
|
-
Puppet.
|
186
|
-
Puppet.
|
185
|
+
if Puppet.settings.print_configs?
|
186
|
+
exit(Puppet.settings.print_configs ? 0 : 1)
|
187
|
+
end
|
187
188
|
|
188
189
|
# A temporary solution, to at least make the master work for now.
|
189
190
|
Puppet::Node::Facts.terminus_class = :yaml
|
data/bin/puppetrun
CHANGED
@@ -139,51 +139,12 @@ begin
|
|
139
139
|
rescue LoadError
|
140
140
|
$stderr.puts "Failed to load ruby LDAP library. LDAP functionality will not be available"
|
141
141
|
end
|
142
|
+
|
142
143
|
require 'puppet'
|
143
144
|
require 'puppet/network/client'
|
145
|
+
require 'puppet/util/ldap/connection'
|
144
146
|
require 'getoptlong'
|
145
147
|
|
146
|
-
|
147
|
-
# Look up all nodes matching a given class in LDAP.
|
148
|
-
def ldapnodes(klass, fqdn = true)
|
149
|
-
unless defined? @ldap
|
150
|
-
setupldap()
|
151
|
-
end
|
152
|
-
|
153
|
-
hosts = []
|
154
|
-
|
155
|
-
filter = nil
|
156
|
-
if klass == :all
|
157
|
-
filter = "objectclass=puppetclient"
|
158
|
-
else
|
159
|
-
filter = "puppetclass=#{klass}"
|
160
|
-
end
|
161
|
-
@ldap.search(Puppet[:ldapbase], 2, filter, "cn") do |entry|
|
162
|
-
# Skip the default host entry
|
163
|
-
if entry.dn =~ /cn=default,/
|
164
|
-
$stderr.puts "Skipping default host entry"
|
165
|
-
next
|
166
|
-
end
|
167
|
-
|
168
|
-
if fqdn
|
169
|
-
hosts << entry.dn.sub("cn=",'').sub(/ou=hosts,/i, '').gsub(",dc=",".")
|
170
|
-
else
|
171
|
-
hosts << entry.get_values("cn")[0]
|
172
|
-
end
|
173
|
-
end
|
174
|
-
|
175
|
-
return hosts
|
176
|
-
end
|
177
|
-
|
178
|
-
def setupldap
|
179
|
-
begin
|
180
|
-
@ldap = Puppet::Parser::Interpreter.ldap()
|
181
|
-
rescue => detail
|
182
|
-
$stderr.puts "Could not connect to LDAP: %s" % detail
|
183
|
-
exit(34)
|
184
|
-
end
|
185
|
-
end
|
186
|
-
|
187
148
|
flags = [
|
188
149
|
[ "--all", "-a", GetoptLong::NO_ARGUMENT ],
|
189
150
|
[ "--tag", "-t", GetoptLong::REQUIRED_ARGUMENT ],
|
@@ -278,11 +239,12 @@ Puppet.parse_config
|
|
278
239
|
|
279
240
|
if Puppet[:node_terminus] = "ldap"
|
280
241
|
if options[:all]
|
281
|
-
hosts =
|
242
|
+
hosts = Puppet::Node.search("whatever").collect { |node| node.name }
|
282
243
|
puts "all: %s" % hosts.join(", ")
|
283
244
|
else
|
245
|
+
hosts = []
|
284
246
|
classes.each do |klass|
|
285
|
-
list =
|
247
|
+
list = Puppet::Node.search("whatever", :class => klass).collect { |node| node.name }
|
286
248
|
puts "%s: %s" % [klass, list.join(", ")]
|
287
249
|
|
288
250
|
hosts += list
|