puppet 0.24.1 → 0.24.2

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.

Files changed (266) hide show
  1. data/CHANGELOG +94 -0
  2. data/Rakefile +0 -4
  3. data/bin/puppet +18 -10
  4. data/bin/puppetd +1 -1
  5. data/bin/puppetdoc +14 -4
  6. data/bin/puppetmasterd +1 -1
  7. data/bin/puppetrun +3 -8
  8. data/bin/ralsh +12 -11
  9. data/conf/freebsd/puppetd +1 -1
  10. data/conf/freebsd/puppetmasterd +1 -1
  11. data/conf/gentoo/puppet/puppet.conf +29 -0
  12. data/conf/namespaceauth.conf +20 -0
  13. data/conf/redhat/puppet.spec +4 -1
  14. data/conf/solaris/smf/puppetd.xml +1 -1
  15. data/conf/solaris/smf/puppetmasterd.xml +1 -1
  16. data/conf/suse/puppet.spec +10 -8
  17. data/examples/root/etc/puppet/{puppetmasterd.conf → puppet.conf} +6 -3
  18. data/ext/logcheck/puppet +7 -0
  19. data/ext/puppet-test +28 -5
  20. data/lib/puppet.rb +2 -1
  21. data/lib/puppet/defaults.rb +12 -5
  22. data/lib/puppet/dsl.rb +43 -45
  23. data/lib/puppet/external/{gratr/rdot.rb → dot.rb} +0 -0
  24. data/lib/puppet/external/nagios.rb +50 -0
  25. data/lib/puppet/external/nagios/base.rb +421 -0
  26. data/lib/puppet/external/nagios/parser.rb +816 -0
  27. data/lib/puppet/file_serving/file_base.rb +16 -3
  28. data/lib/puppet/file_serving/metadata.rb +29 -11
  29. data/lib/puppet/indirector/terminus.rb +1 -0
  30. data/lib/puppet/metatype/closure.rb +4 -0
  31. data/lib/puppet/metatype/evaluation.rb +2 -17
  32. data/lib/puppet/metatype/metaparams.rb +1 -1
  33. data/lib/puppet/network.rb +3 -0
  34. data/lib/puppet/network/client.rb +4 -5
  35. data/lib/puppet/network/client/master.rb +10 -7
  36. data/lib/puppet/network/handler/fileserver.rb +22 -45
  37. data/lib/puppet/network/http_pool.rb +3 -0
  38. data/lib/puppet/network/http_server/mongrel.rb +7 -1
  39. data/lib/puppet/network/http_server/webrick.rb +4 -3
  40. data/lib/puppet/network/xmlrpc/client.rb +12 -1
  41. data/lib/puppet/node/catalog.rb +51 -40
  42. data/lib/puppet/parser/ast.rb +27 -49
  43. data/lib/puppet/parser/ast/astarray.rb +5 -24
  44. data/lib/puppet/parser/ast/caseopt.rb +4 -4
  45. data/lib/puppet/parser/ast/casestatement.rb +4 -5
  46. data/lib/puppet/parser/ast/collection.rb +3 -5
  47. data/lib/puppet/parser/ast/collexpr.rb +3 -5
  48. data/lib/puppet/parser/ast/definition.rb +148 -159
  49. data/lib/puppet/parser/ast/else.rb +2 -3
  50. data/lib/puppet/parser/ast/function.rb +3 -10
  51. data/lib/puppet/parser/ast/hostclass.rb +66 -59
  52. data/lib/puppet/parser/ast/ifstatement.rb +4 -5
  53. data/lib/puppet/parser/ast/leaf.rb +6 -6
  54. data/lib/puppet/parser/ast/node.rb +26 -58
  55. data/lib/puppet/parser/ast/resource.rb +5 -7
  56. data/lib/puppet/parser/ast/resource_defaults.rb +2 -4
  57. data/lib/puppet/parser/ast/resource_override.rb +4 -6
  58. data/lib/puppet/parser/ast/resource_reference.rb +2 -4
  59. data/lib/puppet/parser/ast/resourceparam.rb +2 -4
  60. data/lib/puppet/parser/ast/selector.rb +5 -6
  61. data/lib/puppet/parser/ast/tag.rb +2 -4
  62. data/lib/puppet/parser/ast/vardef.rb +3 -4
  63. data/lib/puppet/parser/collector.rb +5 -5
  64. data/lib/puppet/parser/{compile.rb → compiler.rb} +69 -107
  65. data/lib/puppet/parser/functions.rb +3 -3
  66. data/lib/puppet/parser/interpreter.rb +32 -23
  67. data/lib/puppet/parser/lexer.rb +391 -282
  68. data/lib/puppet/parser/parser.rb +5 -4
  69. data/lib/puppet/parser/parser_support.rb +3 -6
  70. data/lib/puppet/parser/resource.rb +24 -36
  71. data/lib/puppet/parser/resource/param.rb +1 -1
  72. data/lib/puppet/parser/resource/reference.rb +7 -3
  73. data/lib/puppet/parser/scope.rb +12 -7
  74. data/lib/puppet/parser/templatewrapper.rb +1 -1
  75. data/lib/puppet/pgraph.rb +9 -98
  76. data/lib/puppet/provider/interface/redhat.rb +65 -65
  77. data/lib/puppet/provider/mount/parsed.rb +1 -1
  78. data/lib/puppet/provider/naginator.rb +55 -0
  79. data/lib/puppet/provider/nameservice/directoryservice.rb +6 -7
  80. data/lib/puppet/provider/package/fink.rb +0 -2
  81. data/lib/puppet/provider/package/gem.rb +9 -5
  82. data/lib/puppet/provider/package/openbsd.rb +1 -1
  83. data/lib/puppet/provider/package/pkgdmg.rb +3 -8
  84. data/lib/puppet/provider/package/portage.rb +4 -4
  85. data/lib/puppet/provider/package/yumhelper.py +8 -6
  86. data/lib/puppet/provider/parsedfile.rb +7 -1
  87. data/lib/puppet/provider/service/debian.rb +2 -0
  88. data/lib/puppet/provider/service/gentoo.rb +4 -0
  89. data/lib/puppet/provider/service/init.rb +1 -1
  90. data/lib/puppet/provider/sshkey/parsed.rb +2 -0
  91. data/lib/puppet/provider/user/useradd.rb +1 -1
  92. data/lib/puppet/rails.rb +4 -0
  93. data/lib/puppet/rails/database/001_add_created_at_to_all_tables.rb +17 -0
  94. data/lib/puppet/rails/fact_value.rb +4 -0
  95. data/lib/puppet/rails/host.rb +1 -2
  96. data/lib/puppet/rails/param_value.rb +4 -0
  97. data/lib/puppet/rails/resource_tag.rb +4 -0
  98. data/lib/puppet/rails/source_file.rb +4 -1
  99. data/lib/puppet/relationship.rb +5 -1
  100. data/lib/puppet/reports/tagmail.rb +12 -1
  101. data/lib/puppet/resource_reference.rb +1 -1
  102. data/lib/puppet/simple_graph.rb +78 -11
  103. data/lib/puppet/sslcertificates.rb +1 -1
  104. data/lib/puppet/sslcertificates/ca.rb +3 -3
  105. data/lib/puppet/transaction.rb +7 -4
  106. data/lib/puppet/transportable.rb +1 -1
  107. data/lib/puppet/type.rb +3 -10
  108. data/lib/puppet/type/cron.rb +18 -0
  109. data/lib/puppet/type/exec.rb +18 -12
  110. data/lib/puppet/type/{pfile.rb → file.rb} +66 -84
  111. data/lib/puppet/type/file/checksum.rb +271 -0
  112. data/lib/puppet/type/{pfile → file}/content.rb +10 -15
  113. data/lib/puppet/type/{pfile → file}/ensure.rb +15 -8
  114. data/lib/puppet/type/{pfile → file}/group.rb +0 -0
  115. data/lib/puppet/type/{pfile → file}/mode.rb +0 -0
  116. data/lib/puppet/type/{pfile → file}/owner.rb +0 -0
  117. data/lib/puppet/type/{pfile → file}/source.rb +34 -48
  118. data/lib/puppet/type/{pfile → file}/target.rb +0 -0
  119. data/lib/puppet/type/{pfile → file}/type.rb +0 -0
  120. data/lib/puppet/type/{pfilebucket.rb → filebucket.rb} +0 -0
  121. data/lib/puppet/type/host.rb +13 -0
  122. data/lib/puppet/type/mailalias.rb +1 -1
  123. data/lib/puppet/type/nagios_command.rb +3 -0
  124. data/lib/puppet/type/nagios_contact.rb +3 -0
  125. data/lib/puppet/type/nagios_contactgroup.rb +3 -0
  126. data/lib/puppet/type/nagios_host.rb +3 -0
  127. data/lib/puppet/type/nagios_hostextinfo.rb +3 -0
  128. data/lib/puppet/type/nagios_hostgroup.rb +3 -0
  129. data/lib/puppet/type/nagios_hostgroupescalation.rb +3 -0
  130. data/lib/puppet/type/nagios_service.rb +3 -0
  131. data/lib/puppet/type/nagios_servicedependency.rb +3 -0
  132. data/lib/puppet/type/nagios_serviceescalation.rb +3 -0
  133. data/lib/puppet/type/nagios_serviceextinfo.rb +3 -0
  134. data/lib/puppet/type/nagios_timeperiod.rb +3 -0
  135. data/lib/puppet/type/package.rb +4 -12
  136. data/lib/puppet/type/service.rb +9 -0
  137. data/lib/puppet/type/sshkey.rb +3 -3
  138. data/lib/puppet/util/autoload.rb +5 -5
  139. data/lib/puppet/util/checksums.rb +51 -13
  140. data/lib/puppet/util/constant_inflector.rb +14 -0
  141. data/lib/puppet/util/filetype.rb +1 -1
  142. data/lib/puppet/util/graph.rb +3 -9
  143. data/lib/puppet/util/nagios_maker.rb +57 -0
  144. data/lib/puppet/util/settings.rb +19 -16
  145. data/lib/puppet/util/tagging.rb +39 -0
  146. data/test/executables/puppetbin.rb +17 -0
  147. data/test/language/ast.rb +8 -58
  148. data/test/language/ast/casestatement.rb +3 -3
  149. data/test/language/ast/resource.rb +6 -7
  150. data/test/language/ast/resource_reference.rb +12 -12
  151. data/test/language/ast/selector.rb +2 -2
  152. data/test/language/ast/variable.rb +2 -2
  153. data/test/language/functions.rb +24 -24
  154. data/test/language/parser.rb +20 -8
  155. data/test/language/resource.rb +5 -42
  156. data/test/language/scope.rb +21 -37
  157. data/test/language/snippets.rb +7 -0
  158. data/test/lib/puppettest.rb +28 -14
  159. data/test/lib/puppettest/parsertesting.rb +10 -10
  160. data/test/lib/puppettest/support/resources.rb +1 -1
  161. data/test/network/client/master.rb +10 -0
  162. data/test/network/handler/fileserver.rb +51 -49
  163. data/test/network/server/webrick.rb +1 -1
  164. data/test/other/dsl.rb +3 -4
  165. data/test/other/transactions.rb +6 -4
  166. data/test/rails/ast.rb +2 -2
  167. data/test/rails/configuration.rb +1 -1
  168. data/test/rails/railsparameter.rb +2 -0
  169. data/test/rails/railsresource.rb +1 -0
  170. data/test/ral/manager/type.rb +4 -4
  171. data/test/ral/providers/cron/crontab.rb +3 -1
  172. data/test/ral/providers/package.rb +1 -1
  173. data/test/ral/{types → type}/basic.rb +2 -2
  174. data/test/ral/{types → type}/cron.rb +0 -0
  175. data/test/ral/{types → type}/exec.rb +42 -2
  176. data/test/ral/{types → type}/file.rb +34 -79
  177. data/test/ral/{types → type}/file/target.rb +0 -0
  178. data/test/ral/{types → type}/filebucket.rb +0 -0
  179. data/test/ral/{types → type}/fileignoresource.rb +0 -0
  180. data/test/ral/{types → type}/filesources.rb +8 -27
  181. data/test/ral/{types → type}/group.rb +0 -0
  182. data/test/ral/{types → type}/host.rb +16 -0
  183. data/test/ral/{types → type}/mailalias.rb +0 -0
  184. data/test/ral/{types → type}/parameter.rb +0 -0
  185. data/test/ral/{types → type}/port.rb +0 -0
  186. data/test/ral/{types → type}/property.rb +0 -0
  187. data/test/ral/{types → type}/resources.rb +0 -0
  188. data/test/ral/{types → type}/service.rb +0 -0
  189. data/test/ral/{types → type}/sshkey.rb +0 -0
  190. data/test/ral/{types → type}/tidy.rb +1 -0
  191. data/test/ral/{types → type}/user.rb +0 -0
  192. data/test/ral/{types → type}/yumrepo.rb +0 -0
  193. data/test/ral/{types → type}/zone.rb +0 -0
  194. data/test/util/autoload.rb +24 -5
  195. metadata +60 -107
  196. data/conf/gentoo/puppet/puppetca.conf +0 -29
  197. data/conf/gentoo/puppet/puppetd.conf +0 -29
  198. data/conf/gentoo/puppet/puppetmasterd.conf +0 -29
  199. data/examples/root/etc/puppet/puppetd.conf +0 -4
  200. data/lib/puppet/external/gratr.rb +0 -33
  201. data/lib/puppet/external/gratr/adjacency_graph.rb +0 -257
  202. data/lib/puppet/external/gratr/base.rb +0 -34
  203. data/lib/puppet/external/gratr/biconnected.rb +0 -116
  204. data/lib/puppet/external/gratr/chinese_postman.rb +0 -123
  205. data/lib/puppet/external/gratr/common.rb +0 -73
  206. data/lib/puppet/external/gratr/comparability.rb +0 -92
  207. data/lib/puppet/external/gratr/digraph.rb +0 -116
  208. data/lib/puppet/external/gratr/digraph_distance.rb +0 -185
  209. data/lib/puppet/external/gratr/dot.rb +0 -90
  210. data/lib/puppet/external/gratr/edge.rb +0 -145
  211. data/lib/puppet/external/gratr/graph.rb +0 -303
  212. data/lib/puppet/external/gratr/graph_api.rb +0 -83
  213. data/lib/puppet/external/gratr/import.rb +0 -44
  214. data/lib/puppet/external/gratr/labels.rb +0 -90
  215. data/lib/puppet/external/gratr/maximum_flow.rb +0 -64
  216. data/lib/puppet/external/gratr/search.rb +0 -409
  217. data/lib/puppet/external/gratr/strong_components.rb +0 -127
  218. data/lib/puppet/external/gratr/undirected_graph.rb +0 -153
  219. data/lib/puppet/rails/external/tagging/acts_as_taggable.rb +0 -62
  220. data/lib/puppet/rails/external/tagging/init.rb +0 -5
  221. data/lib/puppet/rails/external/tagging/tag.rb +0 -50
  222. data/lib/puppet/rails/external/tagging/tagging.rb +0 -12
  223. data/lib/puppet/rails/puppet_class.rb +0 -6
  224. data/lib/puppet/reference/node_source.rb +0 -9
  225. data/lib/puppet/reference/report.rb +0 -21
  226. data/lib/puppet/type/pfile/checksum.rb +0 -326
  227. data/test/language/ast/definition.rb +0 -166
  228. data/test/language/ast/hostclass.rb +0 -184
  229. data/test/language/compile.rb +0 -569
  230. data/test/language/lexer.rb +0 -276
  231. data/test/lib/mocha.rb +0 -19
  232. data/test/lib/mocha/any_instance_method.rb +0 -35
  233. data/test/lib/mocha/auto_verify.rb +0 -113
  234. data/test/lib/mocha/central.rb +0 -35
  235. data/test/lib/mocha/class_method.rb +0 -62
  236. data/test/lib/mocha/deprecation.rb +0 -22
  237. data/test/lib/mocha/exception_raiser.rb +0 -17
  238. data/test/lib/mocha/expectation.rb +0 -378
  239. data/test/lib/mocha/expectation_error.rb +0 -6
  240. data/test/lib/mocha/infinite_range.rb +0 -25
  241. data/test/lib/mocha/inspect.rb +0 -39
  242. data/test/lib/mocha/instance_method.rb +0 -8
  243. data/test/lib/mocha/is_a.rb +0 -9
  244. data/test/lib/mocha/metaclass.rb +0 -7
  245. data/test/lib/mocha/missing_expectation.rb +0 -27
  246. data/test/lib/mocha/mock.rb +0 -207
  247. data/test/lib/mocha/multiple_yields.rb +0 -20
  248. data/test/lib/mocha/no_yields.rb +0 -11
  249. data/test/lib/mocha/object.rb +0 -110
  250. data/test/lib/mocha/parameter_matchers.rb +0 -9
  251. data/test/lib/mocha/parameter_matchers/all_of.rb +0 -39
  252. data/test/lib/mocha/parameter_matchers/any_of.rb +0 -44
  253. data/test/lib/mocha/parameter_matchers/anything.rb +0 -30
  254. data/test/lib/mocha/parameter_matchers/has_entry.rb +0 -39
  255. data/test/lib/mocha/parameter_matchers/has_key.rb +0 -39
  256. data/test/lib/mocha/parameter_matchers/has_value.rb +0 -39
  257. data/test/lib/mocha/parameter_matchers/includes.rb +0 -37
  258. data/test/lib/mocha/pretty_parameters.rb +0 -28
  259. data/test/lib/mocha/return_values.rb +0 -31
  260. data/test/lib/mocha/setup_and_teardown.rb +0 -23
  261. data/test/lib/mocha/single_return_value.rb +0 -24
  262. data/test/lib/mocha/single_yield.rb +0 -18
  263. data/test/lib/mocha/standalone.rb +0 -32
  264. data/test/lib/mocha/stub.rb +0 -18
  265. data/test/lib/mocha/test_case_adapter.rb +0 -49
  266. data/test/lib/mocha/yield_parameters.rb +0 -31
data/CHANGELOG CHANGED
@@ -1,3 +1,97 @@
1
+ 0.24.2
2
+ Fixing #1062 by moving the yamldir setting to its own yaml
3
+ section. This should keep the yamldir from being created
4
+ on clients.
5
+
6
+ Fixed #1047 -- Puppet's parser no longer changes the order
7
+ in which statements are evaluated, which means that case
8
+ statements can now set variables that are used by other
9
+ variables.
10
+
11
+ Fixed #1063 -- the master correctly logs syntax errors when
12
+ reparsing during a single run.
13
+
14
+ Removed the loglevels from the valid values for `logoutput`
15
+ in the Exec resource type -- the log levels are specified
16
+ using the `loglevel` parameter, not `logoutput`. This never
17
+ worked, or at least hasn`t for ages, and now the docs are
18
+ just correct.
19
+
20
+ Somewhat refactored fileserving so that it no longer caches
21
+ any objects, nor does it use Puppet's RAL resources. In the
22
+ process, I fixed #894 (you can now copy links) and refactored
23
+ other classes as necessary. Mostly it was fixing tests.
24
+
25
+ Hopefully partially fixed #1010 -- clients should now fail
26
+ to install files whose checksums do not match the checksum
27
+ from the server.
28
+
29
+ Fixed #1018 -- resources now have their namevars added as
30
+ aliases in the resource catalog, just like they were added
31
+ in the resource classes.
32
+
33
+ Fixed #1037 -- remote unreadable files no longer have the
34
+ permission denied exceptions caught, thus forbidding them
35
+ from being replaced with 'nil'.
36
+
37
+ Fixed #1043 -- autoloading now searches the plugins directory
38
+ in each module, in addition to the lib directory. The 'lib'
39
+ directory is also deprecated, but supported for now to give
40
+ people a chance to convert.
41
+
42
+ Fixed #1003 -- Applying DavidS's patch to fix searching for
43
+ tags in sql.
44
+
45
+ Fixed #992 -- Puppet is now compatible with gems 1.0.1.
46
+
47
+ Fixed #968 again, this time with tests -- parseonly works,
48
+ including not compiling the configurations, and also storeconfigs
49
+ is no longer required during parse-testing.
50
+
51
+ Fixed #1021 -- the problem was that my method of determining
52
+ the in-degree sometimes resulted in a lower number than the
53
+ number of in-edges.
54
+
55
+ Fixed #997 -- virtual defined types are no longer evaluated.
56
+ NOTE: This introduces a behaviour change, in that you previously
57
+ could realize a resource within a virtual defined resource, and now
58
+ you must realize the entire defined resource, rather than just
59
+ the contained resource.
60
+
61
+ Fixed #1030 - class and definition evaluation has been significantly
62
+ refactored, fixing this problem and making the whole interplay
63
+ between the classes, definitions, and nodes, and the Compile class much
64
+ cleaner.
65
+
66
+ Exec resources must now have unique names, although the commands can still
67
+ be duplicated. This is easily accomplished by just specifying a unique
68
+ name with whatever (unique or otherwise) command you need.
69
+
70
+ Fixed #989 -- missing CRL files are correctly ignored, and the
71
+ value should be set to 'false' to explicitly not look for these
72
+ files.
73
+
74
+ Fixed #1017 -- environment-specific modulepath is no longer ignored.
75
+
76
+ Fixing #794 -- consolidating the gentoo configuration files.
77
+
78
+ Fixing #976 -- both the full name of qualified classes and
79
+ the class parts are now added as tags. I've also
80
+ created a Tagging module that we should push throughout
81
+ the rest of the system that uses tags.
82
+
83
+ Fixing #995 -- puppetd no longer dies at startup if the server
84
+ is not running.
85
+
86
+ Fixing #977 -- the rundir is again set to 1777.
87
+
88
+ Fixed #971 -- classes can once again be included multiple
89
+ times.
90
+
91
+ Added builtin support for Nagios types using
92
+ Naginator to parse and generate the files.
93
+
94
+ 0.24.1
1
95
  Updated vim filetype detection. (#900 and #963)
2
96
 
3
97
  Default resources like schedules no longer conflict with
data/Rakefile CHANGED
@@ -83,10 +83,6 @@ rule(/_is_runnable$/) do |t|
83
83
  end
84
84
  end
85
85
 
86
- file "debian" => :bzr_is_runnable do
87
- system("bzr get http://www.hezmatt.org/~mpalmer/bzr/puppet.debian.svn debian") || exit(1)
88
- end
89
-
90
86
  task :check_build_deps => 'dpkg-checkbuilddeps_is_runnable' do
91
87
  system("dpkg-checkbuilddeps") || exit(1)
92
88
  end
data/bin/puppet CHANGED
@@ -136,6 +136,14 @@ end
136
136
 
137
137
  Puppet.parse_config
138
138
 
139
+ # Now parse the config
140
+ if Puppet[:config] and File.exists? Puppet[:config]
141
+ Puppet.settings.parse(Puppet[:config])
142
+ end
143
+
144
+ Puppet.genconfig
145
+ Puppet.genmanifest
146
+
139
147
  # If noop is set, then also enable diffs
140
148
  if Puppet[:noop]
141
149
  Puppet[:show_diff] = true
@@ -156,14 +164,6 @@ elsif options[:verbose]
156
164
  Puppet::Util::Log.level = :info
157
165
  end
158
166
 
159
- # Now parse the config
160
- if Puppet[:config] and File.exists? Puppet[:config]
161
- Puppet.settings.parse(Puppet[:config])
162
- end
163
-
164
- Puppet.genconfig
165
- Puppet.genmanifest
166
-
167
167
  # Set our code or file to use.
168
168
  if options[:code] or ARGV.length == 0
169
169
  Puppet[:code] = options[:code] || STDIN.read
@@ -171,6 +171,16 @@ else
171
171
  Puppet[:manifest] = ARGV.shift
172
172
  end
173
173
 
174
+ if Puppet[:parseonly]
175
+ begin
176
+ Puppet::Parser::Interpreter.new.parser(Puppet[:environment])
177
+ rescue => detail
178
+ Puppet.err detail
179
+ exit 1
180
+ end
181
+ exit 0
182
+ end
183
+
174
184
  # Collect our facts.
175
185
  facts = Puppet::Node::Facts.find("me")
176
186
  facts.name = facts.values["hostname"]
@@ -198,8 +208,6 @@ begin
198
208
  # Compile our catalog
199
209
  catalog = Puppet::Node::Catalog.find(node)
200
210
 
201
- exit(0) if Puppet[:parseonly]
202
-
203
211
  # Translate it to a RAL catalog
204
212
  catalog = catalog.to_ral
205
213
 
@@ -374,7 +374,7 @@ if Puppet[:listen] and ! options[:onetime]
374
374
  # to clients. In the meantime, we just disable CRL checking if
375
375
  # the CRL file doesn't exist
376
376
  unless File::exist?(Puppet[:cacrl])
377
- Puppet[:cacrl] = 'none'
377
+ Puppet[:cacrl] = 'false'
378
378
  end
379
379
 
380
380
  handlers = nil
@@ -128,11 +128,19 @@ else
128
128
  else
129
129
  with_contents = true
130
130
  end
131
+ exit_code = 0
131
132
  options[:references].sort { |a,b| a.to_s <=> b.to_s }.each do |name|
132
- section = Puppet::Util::Reference.reference(name)
133
-
134
- # Add the per-section text, but with no ToC
135
- text += section.send(options[:format], with_contents)
133
+ raise "Could not find reference %s" % name unless section = Puppet::Util::Reference.reference(name)
134
+
135
+ begin
136
+ # Add the per-section text, but with no ToC
137
+ text += section.send(options[:format], with_contents)
138
+ rescue => detail
139
+ puts detail.backtrace
140
+ $stderr.puts "Could not generate reference %s: %s" % [name, detail]
141
+ exit_code = 1
142
+ next
143
+ end
136
144
  end
137
145
 
138
146
  unless with_contents # We've only got one reference
@@ -147,6 +155,8 @@ else
147
155
  else
148
156
  puts text
149
157
  end
158
+
159
+ exit exit_code
150
160
  end
151
161
 
152
162
 
@@ -81,13 +81,13 @@ end
81
81
 
82
82
  require 'getoptlong'
83
83
  require 'puppet'
84
+ require 'puppet/network/handler'
84
85
  require 'puppet/sslcertificates'
85
86
 
86
87
  options = [
87
88
  [ "--debug", "-d", GetoptLong::NO_ARGUMENT ],
88
89
  [ "--help", "-h", GetoptLong::NO_ARGUMENT ],
89
90
  [ "--logdest", "-l", GetoptLong::REQUIRED_ARGUMENT ],
90
- [ "--noca", GetoptLong::NO_ARGUMENT ],
91
91
  [ "--nobucket", GetoptLong::NO_ARGUMENT ],
92
92
  [ "--noreports", GetoptLong::NO_ARGUMENT ],
93
93
  [ "--nonodes", GetoptLong::NO_ARGUMENT ],
@@ -40,7 +40,7 @@
40
40
  # you want any Puppet daemon to allow -- it is currently global to all Puppet
41
41
  # daemons.
42
42
  #
43
- # An example file looks like this:
43
+ # An example file looks like this::
44
44
  #
45
45
  # [fileserver]
46
46
  # allow *.madstop.com
@@ -274,14 +274,9 @@ else
274
274
  end
275
275
 
276
276
  # Now parse the config
277
- config = File.join(Puppet[:confdir], "puppetmasterd.conf")
278
- Puppet.parse_config(config)
277
+ Puppet.parse_config
279
278
 
280
- if File.exists? config
281
- Puppet.settings.parse(config)
282
- end
283
-
284
- if Puppet[:ldapnodes]
279
+ if Puppet[:node_terminus] = "ldap"
285
280
  if options[:all]
286
281
  hosts = ldapnodes(:all, options[:fqdn])
287
282
  puts "all: %s" % hosts.join(", ")
data/bin/ralsh CHANGED
@@ -63,17 +63,18 @@
63
63
  #
64
64
  # = Example
65
65
  #
66
- # $ ralsh user luke
67
- # user { 'luke':
68
- # home => '/home/luke',
69
- # uid => '100',
70
- # ensure => 'present',
71
- # comment => 'Luke Kanies,,,',
72
- # gid => '1000',
73
- # shell => '/bin/bash',
74
- # groups => ['sysadmin','audio','video','puppet']
75
- # }
76
- # $
66
+ # This example uses ``ralsh`` to return Puppet configuration for the user ``luke``::
67
+ #
68
+ # $ ralsh user luke
69
+ # user { 'luke':
70
+ # home => '/home/luke',
71
+ # uid => '100',
72
+ # ensure => 'present',
73
+ # comment => 'Luke Kanies,,,',
74
+ # gid => '1000',
75
+ # shell => '/bin/bash',
76
+ # groups => ['sysadmin','audio','video','puppet']
77
+ # }
77
78
  #
78
79
  # = Author
79
80
  #
@@ -18,7 +18,7 @@ pidfile="/var/run/$name.pid"
18
18
  # read configuration and set defaults
19
19
  load_rc_config "$name"
20
20
  : ${puppetd_enable="NO"}
21
- : ${puppetd_config="/usr/local/etc/puppetd.conf"}
21
+ : ${puppetd_config="/usr/local/etc/puppet.conf"}
22
22
  : ${puppetd_flags=""}
23
23
 
24
24
  command_args="--config $puppetd_config $puppetd_flags"
@@ -18,7 +18,7 @@ pidfile="/var/run/$name.pid"
18
18
  # read configuration and set defaults
19
19
  load_rc_config "$name"
20
20
  : ${puppetmasterd_enable="NO"}
21
- : ${puppetmasterd_config="/usr/local/etc/puppetmasterd.conf"}
21
+ : ${puppetmasterd_config="/usr/local/etc/puppet.conf"}
22
22
  : ${puppetmasterd_flags=""}
23
23
 
24
24
  command_args="--config $puppetmasterd_config $puppetmasterd_flags"
@@ -0,0 +1,29 @@
1
+ [main]
2
+ # Where Puppet stores dynamic and growing data.
3
+ # The default value is '/var/puppet'.
4
+ vardir = /var/lib/puppet
5
+
6
+ # The Puppet log directory.
7
+ # The default value is '$vardir/log'.
8
+ logdir = /var/log/puppet
9
+
10
+ # Where Puppet PID files are kept.
11
+ # The default value is '$vardir/run'.
12
+ rundir = /var/run/puppet
13
+
14
+ # Where SSL certificates are kept.
15
+ # The default value is '$confdir/ssl'.
16
+ ssldir = $vardir/ssl
17
+
18
+ [puppetd]
19
+ # The file in which puppetd stores a list of the classes
20
+ # associated with the retrieved configuratiion. Can be loaded in
21
+ # the separate ``puppet`` executable using the ``--loadclasses``
22
+ # option.
23
+ # The default value is '$confdir/classes.txt'.
24
+ classfile = $vardir/classes.txt
25
+
26
+ # Where puppetd caches the local configuration. An
27
+ # extension indicating the cache format is added automatically.
28
+ # The default value is '$confdir/localconfig'.
29
+ localconfig = $vardir/localconfig
@@ -0,0 +1,20 @@
1
+ # This is an example namespaceauth.conf file,
2
+ # which you'll need if you want to start a client
3
+ # in --listen mode.
4
+ [fileserver]
5
+ allow *.domain.com
6
+
7
+ [puppetmaster]
8
+ allow *.domain.com
9
+
10
+ [puppetrunner]
11
+ allow culain.domain.com
12
+
13
+ [puppetbucket]
14
+ allow *.domain.com
15
+
16
+ [puppetreports]
17
+ allow *.domain.com
18
+
19
+ [resource]
20
+ allow server.domain.com
@@ -7,7 +7,7 @@
7
7
 
8
8
  Summary: A network tool for managing many disparate systems
9
9
  Name: puppet
10
- Version: 0.24.1
10
+ Version: 0.24.2
11
11
  Release: 1%{?dist}
12
12
  License: GPLv2+
13
13
  Group: System Environment/Base
@@ -157,6 +157,9 @@ fi
157
157
  rm -rf %{buildroot}
158
158
 
159
159
  %changelog
160
+ * Sat Dec 22 2007 David Lutterkort <dlutter@redhat.com> - 0.24.1-1
161
+ - New version
162
+
160
163
  * Mon Dec 17 2007 David Lutterkort <dlutter@redhat.com> - 0.24.0-2
161
164
  - Use updated upstream tarball that contains yumhelper.py
162
165
 
@@ -18,7 +18,7 @@
18
18
  grouping='require_all'
19
19
  restart_on='none'
20
20
  type='path'>
21
- <service_fmri value='file:///etc/puppet/puppetd.conf'/>
21
+ <service_fmri value='file:///etc/puppet/puppet.conf'/>
22
22
  </dependency>
23
23
 
24
24
  <dependency name='loopback'
@@ -18,7 +18,7 @@
18
18
  grouping='require_all'
19
19
  restart_on='none'
20
20
  type='path'>
21
- <service_fmri value='file:///etc/puppet/puppetmasterd.conf'/>
21
+ <service_fmri value='file:///etc/puppet/puppet.conf'/>
22
22
  </dependency>
23
23
 
24
24
  <dependency name='loopback'
@@ -5,7 +5,7 @@
5
5
 
6
6
  Summary: A network tool for managing many disparate systems
7
7
  Name: puppet
8
- Version: 0.18.4
8
+ Version: 0.24.1
9
9
  Release: 3%{?dist}
10
10
  License: GPL
11
11
  Group: System Environment/Base
@@ -15,11 +15,11 @@ Source: http://reductivelabs.com/downloads/puppet/%{name}-%{version}.tgz
15
15
  Patch0: puppet.suse.patch
16
16
  Patch1: puppet.service.patch
17
17
 
18
- Requires: ruby >= 1.8.1
19
- Requires: facter >= 1.1.4
18
+ Requires: ruby >= 1.8.6
19
+ Requires: facter >= 1.3.7
20
20
  BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
21
21
  BuildArchitectures: noarch
22
- BuildRequires: ruby >= 1.8.1
22
+ BuildRequires: ruby >= 1.8.6
23
23
 
24
24
  %description
25
25
  Puppet lets you centrally manage every important aspect of your system using a
@@ -67,9 +67,7 @@ find %{buildroot}%{ruby_sitelibdir} -type f -perm +ugo+x -print0 | xargs -0 -r %
67
67
  %{__install} -Dp -m0644 %{confdir}/server.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/puppetmaster
68
68
  %{__install} -Dp -m0755 %{suseconfdir}/server.init %{buildroot}%{_initrddir}/puppetmaster
69
69
  %{__install} -Dp -m0644 %{confdir}/fileserver.conf %{buildroot}%{_sysconfdir}/puppet/fileserver.conf
70
- %{__install} -Dp -m0644 %{confdir}/puppetd.conf %{buildroot}%{_sysconfdir}/puppet/puppetd.conf
71
- %{__ln_s} puppetd.conf %{buildroot}%{_sysconfdir}/puppet/puppetmasterd.conf
72
- %{__ln_s} puppetd.conf %{buildroot}%{_sysconfdir}/puppet/puppetca.conf
70
+ %{__install} -Dp -m0644 %{confdir}/puppet.conf %{buildroot}%{_sysconfdir}/puppet/puppet.conf
73
71
  %{__install} -Dp -m0644 %{confdir}/logrotate %{buildroot}%{_sysconfdir}/logrotate.d/puppet
74
72
 
75
73
  %files
@@ -79,7 +77,7 @@ find %{buildroot}%{ruby_sitelibdir} -type f -perm +ugo+x -print0 | xargs -0 -r %
79
77
  %{ruby_sitelibdir}/*
80
78
  %{_initrddir}/puppet
81
79
  %config(noreplace) %{_sysconfdir}/sysconfig/puppet
82
- %config(noreplace) %{_sysconfdir}/puppet/puppetd.conf
80
+ %config(noreplace) %{_sysconfdir}/puppet/puppet.conf
83
81
  %doc CHANGELOG COPYING LICENSE README TODO examples
84
82
  %exclude %{_sbindir}/puppetdoc
85
83
  %config(noreplace) %{_sysconfdir}/logrotate.d/puppet
@@ -131,6 +129,10 @@ fi
131
129
  %{__rm} -rf %{buildroot}
132
130
 
133
131
  %changelog
132
+ * Sat Feb 16 2008 James Turnbull <james@lovedthanlost.net> - 0.24.1-1
133
+ - Fixed puppet configuation file references to match single puppet.conf file
134
+ - Update versions for 0.24.1 release
135
+
134
136
  * Tue Aug 3 2006 Martin Vuk <martin.vuk@fri.uni-lj.si> - 0.18.4-3
135
137
  - Replaced puppet-bin.patch with %build section from David's spec
136
138
 
@@ -1,7 +1,10 @@
1
+ [puppetd]
2
+ report = true
3
+ factsync = true
4
+ pluginsync = true
5
+
1
6
  [puppetmasterd]
2
7
  reports = store,rrdgraph,tagmail,log
3
-
4
- [ldap]
5
- ldapnodes = true
8
+ node_terminus = ldap
6
9
  ldapserver = culain.madstop.com
7
10
  ldapbase = dc=madstop,dc=com