puppet 0.24.5 → 0.24.6

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 (354) hide show
  1. data/CHANGELOG +206 -0
  2. data/Rakefile +53 -0
  3. data/bin/filebucket +0 -0
  4. data/bin/puppet +32 -11
  5. data/bin/puppetca +1 -0
  6. data/bin/puppetd +0 -0
  7. data/bin/puppetdoc +0 -0
  8. data/bin/puppetmasterd +0 -0
  9. data/bin/puppetrun +16 -8
  10. data/bin/ralsh +0 -0
  11. data/conf/debian/rules +0 -0
  12. data/conf/gentoo/init.d/puppetmaster +0 -0
  13. data/conf/osx/PackageInfo.plist +36 -0
  14. data/conf/osx/createpackage.sh +167 -0
  15. data/conf/osx/preflight +12 -0
  16. data/conf/redhat/client.init +1 -1
  17. data/conf/redhat/puppet.spec +34 -6
  18. data/conf/redhat/server.init +42 -7
  19. data/conf/redhat/server.sysconfig +22 -0
  20. data/conf/solaris/smf/svc-puppetd +0 -0
  21. data/conf/solaris/smf/svc-puppetmasterd +0 -0
  22. data/examples/etc/init.d/sleeper +0 -0
  23. data/examples/mac_dscl.pp +0 -0
  24. data/examples/mac_dscl_revert.pp +0 -0
  25. data/examples/mac_netinfo.pp +0 -0
  26. data/examples/mac_pkgdmg.pp +0 -0
  27. data/ext/bin/sleeper +0 -0
  28. data/ext/module_puppet +0 -0
  29. data/ext/nagios/check_puppet.rb +0 -0
  30. data/ext/passenger/README +63 -0
  31. data/ext/passenger/apache2.conf +29 -0
  32. data/ext/passenger/config.ru +40 -0
  33. data/ext/puppet-test +0 -0
  34. data/ext/puppetlast +6 -31
  35. data/ext/puppetstoredconfigclean.rb +87 -0
  36. data/install.rb +75 -20
  37. data/lib/puppet.rb +1 -1
  38. data/lib/puppet/daemon.rb +0 -0
  39. data/lib/puppet/defaults.rb +3 -7
  40. data/lib/puppet/external/base64.rb +0 -0
  41. data/lib/puppet/external/nagios.rb +0 -0
  42. data/lib/puppet/external/nagios/base.rb +0 -0
  43. data/lib/puppet/file_serving/fileset.rb +2 -2
  44. data/lib/puppet/file_serving/metadata.rb +3 -3
  45. data/lib/puppet/indirector/facts/facter.rb +3 -2
  46. data/lib/puppet/indirector/yaml.rb +10 -1
  47. data/lib/puppet/module.rb +36 -12
  48. data/lib/puppet/network/authstore.rb +0 -0
  49. data/lib/puppet/network/client/master.rb +12 -11
  50. data/lib/puppet/network/handler/filebucket.rb +0 -0
  51. data/lib/puppet/network/handler/fileserver.rb +38 -46
  52. data/lib/puppet/network/handler/master.rb +1 -1
  53. data/lib/puppet/network/handler/report.rb +0 -0
  54. data/lib/puppet/network/handler/resource.rb +0 -0
  55. data/lib/puppet/network/handler/runner.rb +0 -0
  56. data/lib/puppet/network/http_server/rack.rb +148 -0
  57. data/lib/puppet/network/rights.rb +0 -0
  58. data/lib/puppet/network/xmlrpc/client.rb +5 -5
  59. data/lib/puppet/node.rb +5 -9
  60. data/lib/puppet/node/environment.rb +1 -17
  61. data/lib/puppet/node/facts.rb +0 -0
  62. data/lib/puppet/parameter.rb +1 -28
  63. data/lib/puppet/parser/ast.rb +6 -0
  64. data/lib/puppet/parser/ast/arithmetic_operator.rb +41 -0
  65. data/lib/puppet/parser/ast/boolean_operator.rb +48 -0
  66. data/lib/puppet/parser/ast/collexpr.rb +6 -1
  67. data/lib/puppet/parser/ast/comparison_operator.rb +37 -0
  68. data/lib/puppet/parser/ast/minus.rb +23 -0
  69. data/lib/puppet/parser/ast/nop.rb +11 -0
  70. data/lib/puppet/parser/ast/not.rb +19 -0
  71. data/lib/puppet/parser/ast/resource_override.rb +23 -16
  72. data/lib/puppet/parser/ast/resource_reference.rb +10 -6
  73. data/lib/puppet/parser/ast/vardef.rb +2 -2
  74. data/lib/puppet/parser/collector.rb +2 -1
  75. data/lib/puppet/parser/functions.rb +7 -217
  76. data/lib/puppet/parser/functions/defined.rb +27 -0
  77. data/lib/puppet/parser/functions/fail.rb +4 -0
  78. data/lib/puppet/parser/functions/file.rb +21 -0
  79. data/lib/puppet/parser/functions/fqdn_rand.rb +15 -0
  80. data/lib/puppet/parser/functions/generate.rb +35 -0
  81. data/lib/puppet/parser/functions/include.rb +26 -0
  82. data/lib/puppet/parser/functions/realize.rb +14 -0
  83. data/lib/puppet/parser/functions/search.rb +7 -0
  84. data/lib/puppet/parser/functions/sha1.rb +6 -0
  85. data/lib/puppet/parser/functions/tag.rb +6 -0
  86. data/lib/puppet/parser/functions/tagged.rb +18 -0
  87. data/lib/puppet/parser/functions/template.rb +22 -0
  88. data/lib/puppet/parser/lexer.rb +15 -5
  89. data/lib/puppet/parser/parser.rb +1073 -715
  90. data/lib/puppet/parser/parser_support.rb +18 -13
  91. data/lib/puppet/parser/resource.rb +1 -1
  92. data/lib/puppet/parser/resource/param.rb +10 -2
  93. data/lib/puppet/parser/scope.rb +63 -5
  94. data/lib/puppet/parser/templatewrapper.rb +61 -15
  95. data/lib/puppet/property.rb +7 -1
  96. data/lib/puppet/property/keyvalue.rb +96 -0
  97. data/lib/puppet/property/list.rb +78 -0
  98. data/lib/puppet/provider/confine.rb +1 -1
  99. data/lib/puppet/provider/confine/variable.rb +10 -1
  100. data/lib/puppet/provider/cron/crontab.rb +0 -0
  101. data/lib/puppet/provider/mailalias/aliases.rb +0 -0
  102. data/lib/puppet/provider/maillist/mailman.rb +0 -0
  103. data/lib/puppet/provider/mount/parsed.rb +0 -0
  104. data/lib/puppet/provider/nameservice.rb +24 -39
  105. data/lib/puppet/provider/nameservice/directoryservice.rb +12 -3
  106. data/lib/puppet/provider/nameservice/netinfo.rb +12 -2
  107. data/lib/puppet/provider/nameservice/objectadd.rb +1 -10
  108. data/lib/puppet/provider/package/appdmg.rb +1 -1
  109. data/lib/puppet/provider/package/apple.rb +0 -0
  110. data/lib/puppet/provider/package/apt.rb +14 -21
  111. data/lib/puppet/provider/package/aptitude.rb +0 -0
  112. data/lib/puppet/provider/package/blastwave.rb +2 -0
  113. data/lib/puppet/provider/package/darwinport.rb +0 -0
  114. data/lib/puppet/provider/package/dpkg.rb +33 -51
  115. data/lib/puppet/provider/package/fink.rb +1 -1
  116. data/lib/puppet/provider/package/freebsd.rb +0 -0
  117. data/lib/puppet/provider/package/gem.rb +0 -0
  118. data/lib/puppet/provider/package/hpux.rb +46 -0
  119. data/lib/puppet/provider/package/openbsd.rb +0 -0
  120. data/lib/puppet/provider/package/pkgdmg.rb +1 -1
  121. data/lib/puppet/provider/package/portage.rb +3 -1
  122. data/lib/puppet/provider/package/ports.rb +3 -3
  123. data/lib/puppet/provider/package/rpm.rb +8 -1
  124. data/lib/puppet/provider/package/rug.rb +2 -2
  125. data/lib/puppet/provider/package/sun.rb +2 -0
  126. data/lib/puppet/provider/package/sunfreeware.rb +3 -0
  127. data/lib/puppet/provider/package/yum.rb +24 -17
  128. data/lib/puppet/provider/package/yumhelper.py +92 -11
  129. data/lib/puppet/provider/parsedfile.rb +0 -0
  130. data/lib/puppet/provider/port/parsed.rb +0 -0
  131. data/lib/puppet/provider/selboolean/getsetsebool.rb +47 -0
  132. data/lib/puppet/provider/selmodule/semodule.rb +143 -0
  133. data/lib/puppet/provider/service/base.rb +0 -0
  134. data/lib/puppet/provider/service/daemontools.rb +154 -0
  135. data/lib/puppet/provider/service/debian.rb +1 -1
  136. data/lib/puppet/provider/service/freebsd.rb +2 -0
  137. data/lib/puppet/provider/service/gentoo.rb +2 -0
  138. data/lib/puppet/provider/service/init.rb +0 -0
  139. data/lib/puppet/provider/service/redhat.rb +1 -1
  140. data/lib/puppet/provider/service/runit.rb +93 -0
  141. data/lib/puppet/provider/service/smf.rb +2 -0
  142. data/lib/puppet/provider/ssh_authorized_key/parsed.rb +7 -1
  143. data/lib/puppet/provider/sshkey/parsed.rb +0 -0
  144. data/lib/puppet/provider/user/hpux.rb +30 -0
  145. data/lib/puppet/provider/user/user_role_add.rb +156 -0
  146. data/lib/puppet/provider/user/useradd.rb +23 -14
  147. data/lib/puppet/rails/database/002_remove_duplicated_index_on_all_tables.rb +17 -0
  148. data/lib/puppet/rails/database/schema.rb +0 -8
  149. data/lib/puppet/rails/resource.rb +6 -6
  150. data/lib/puppet/reference/configuration.rb +0 -7
  151. data/lib/puppet/reports.rb +0 -0
  152. data/lib/puppet/reports/rrdgraph.rb +3 -2
  153. data/lib/puppet/sslcertificates.rb +0 -0
  154. data/lib/puppet/sslcertificates/inventory.rb +3 -2
  155. data/lib/puppet/sslcertificates/support.rb +3 -0
  156. data/lib/puppet/transaction/report.rb +1 -7
  157. data/lib/puppet/transportable.rb +10 -7
  158. data/lib/puppet/type.rb +2110 -14
  159. data/lib/puppet/type/cron.rb +0 -0
  160. data/lib/puppet/type/exec.rb +0 -0
  161. data/lib/puppet/type/file.rb +12 -2
  162. data/lib/puppet/type/file/checksum.rb +4 -0
  163. data/lib/puppet/type/file/content.rb +0 -0
  164. data/lib/puppet/type/file/ensure.rb +0 -0
  165. data/lib/puppet/type/file/group.rb +30 -43
  166. data/lib/puppet/type/file/mode.rb +0 -0
  167. data/lib/puppet/type/file/owner.rb +0 -0
  168. data/lib/puppet/type/file/selcontext.rb +104 -0
  169. data/lib/puppet/type/file/source.rb +0 -0
  170. data/lib/puppet/type/file/type.rb +0 -0
  171. data/lib/puppet/type/filebucket.rb +0 -0
  172. data/lib/puppet/type/group.rb +0 -8
  173. data/lib/puppet/type/host.rb +0 -0
  174. data/lib/puppet/type/mailalias.rb +0 -0
  175. data/lib/puppet/type/maillist.rb +0 -0
  176. data/lib/puppet/type/mount.rb +0 -0
  177. data/lib/puppet/type/package.rb +2 -2
  178. data/lib/puppet/type/port.rb +0 -0
  179. data/lib/puppet/type/schedule.rb +0 -0
  180. data/lib/puppet/type/selboolean.rb +31 -0
  181. data/lib/puppet/type/selmodule.rb +54 -0
  182. data/lib/puppet/type/ssh_authorized_key.rb +3 -3
  183. data/lib/puppet/type/sshkey.rb +0 -0
  184. data/lib/puppet/type/tidy.rb +0 -0
  185. data/lib/puppet/type/user.rb +153 -137
  186. data/lib/puppet/type/yumrepo.rb +18 -2
  187. data/lib/puppet/type/zone.rb +5 -1
  188. data/lib/puppet/util.rb +7 -7
  189. data/lib/puppet/util/filetype.rb +7 -0
  190. data/lib/puppet/util/instance_loader.rb +0 -0
  191. data/lib/puppet/util/ldap/connection.rb +11 -1
  192. data/lib/puppet/util/ldap/manager.rb +1 -1
  193. data/lib/puppet/util/loadedfile.rb +0 -0
  194. data/lib/puppet/util/log.rb +42 -43
  195. data/lib/puppet/util/metric.rb +23 -9
  196. data/lib/puppet/util/posix.rb +69 -18
  197. data/lib/puppet/util/selinux.rb +139 -0
  198. data/lib/puppet/util/settings.rb +5 -7
  199. data/lib/puppet/util/user_attr.rb +21 -0
  200. data/test/certmgr/ca.rb +0 -0
  201. data/test/certmgr/certmgr.rb +0 -0
  202. data/test/certmgr/inventory.rb +0 -0
  203. data/test/certmgr/support.rb +0 -0
  204. data/test/data/providers/ssh_authorized_key/parsed/authorized_keys1 +3 -0
  205. data/test/data/snippets/append.pp +11 -0
  206. data/test/data/snippets/arithmetic_expression.pp +8 -0
  207. data/test/data/snippets/arraytrailingcomma.pp +3 -0
  208. data/test/data/snippets/emptyifelse.pp +9 -0
  209. data/test/data/snippets/funccomma.pp +5 -0
  210. data/test/data/snippets/ifexpression.rb +6 -0
  211. data/test/data/snippets/subclass_name_duplication.pp +0 -0
  212. data/test/executables/filebucket.rb +0 -0
  213. data/test/executables/puppetbin.rb +0 -0
  214. data/test/executables/puppetca.rb +0 -0
  215. data/test/executables/puppetd.rb +0 -0
  216. data/test/executables/puppetmasterd.rb +0 -0
  217. data/test/executables/puppetmodule.rb +0 -0
  218. data/test/language/ast.rb +0 -0
  219. data/test/language/ast/casestatement.rb +0 -0
  220. data/test/language/ast/resource.rb +0 -0
  221. data/test/language/ast/resource_reference.rb +0 -28
  222. data/test/language/ast/selector.rb +0 -0
  223. data/test/language/ast/variable.rb +0 -0
  224. data/test/language/functions.rb +91 -12
  225. data/test/language/parser.rb +21 -0
  226. data/test/language/resource.rb +0 -0
  227. data/test/language/scope.rb +28 -0
  228. data/test/language/snippets.rb +14 -0
  229. data/test/language/transportable.rb +0 -0
  230. data/test/lib/puppettest.rb +0 -0
  231. data/test/lib/puppettest/reporttesting.rb +0 -2
  232. data/test/lib/puppettest/runnable_test.rb +2 -0
  233. data/test/lib/puppettest/support/resources.rb +0 -0
  234. data/test/network/authconfig.rb +0 -0
  235. data/test/network/authorization.rb +0 -0
  236. data/test/network/authstore.rb +0 -0
  237. data/test/network/client/ca.rb +0 -0
  238. data/test/network/client/client.rb +0 -0
  239. data/test/network/client/dipper.rb +0 -0
  240. data/test/network/client/master.rb +2 -6
  241. data/test/network/client/resource.rb +0 -0
  242. data/test/network/client_request.rb +0 -0
  243. data/test/network/daemon.rb +0 -0
  244. data/test/network/handler/bucket.rb +0 -0
  245. data/test/network/handler/ca.rb +0 -0
  246. data/test/network/handler/fileserver.rb +8 -0
  247. data/test/network/handler/handler.rb +0 -0
  248. data/test/network/handler/master.rb +3 -1
  249. data/test/network/handler/report.rb +0 -0
  250. data/test/network/handler/resource.rb +0 -0
  251. data/test/network/handler/runner.rb +0 -0
  252. data/test/network/rights.rb +0 -0
  253. data/test/network/server/mongrel_test.rb +0 -0
  254. data/test/network/server/webrick.rb +0 -0
  255. data/test/network/xmlrpc/client.rb +0 -0
  256. data/test/network/xmlrpc/processor.rb +0 -0
  257. data/test/network/xmlrpc/server.rb +0 -0
  258. data/test/network/xmlrpc/webrick_servlet.rb +0 -0
  259. data/test/other/dsl.rb +0 -0
  260. data/test/other/events.rb +0 -0
  261. data/test/other/overrides.rb +0 -0
  262. data/test/other/provider.rb +0 -0
  263. data/test/other/puppet.rb +0 -0
  264. data/test/other/relationships.rb +0 -0
  265. data/test/other/report.rb +2 -4
  266. data/test/other/transactions.rb +1 -1
  267. data/test/puppet/conffiles.rb +0 -0
  268. data/test/puppet/defaults.rb +0 -0
  269. data/test/puppet/errortest.rb +0 -0
  270. data/test/puppet/tc_suidmanager.rb +0 -0
  271. data/test/rails/ast.rb +0 -0
  272. data/test/rails/configuration.rb +0 -0
  273. data/test/rails/host.rb +0 -0
  274. data/test/rails/rails.rb +0 -0
  275. data/test/rails/railsparameter.rb +0 -0
  276. data/test/rails/railsresource.rb +0 -0
  277. data/test/ral/manager/attributes.rb +0 -0
  278. data/test/ral/manager/instances.rb +0 -0
  279. data/test/ral/manager/manager.rb +0 -0
  280. data/test/ral/manager/provider.rb +0 -0
  281. data/test/ral/manager/type.rb +0 -0
  282. data/test/ral/providers/cron/crontab.rb +0 -0
  283. data/test/ral/providers/group.rb +14 -13
  284. data/test/ral/providers/host/netinfo.rb +0 -0
  285. data/test/ral/providers/host/parsed.rb +0 -0
  286. data/test/ral/providers/mailalias/aliases.rb +0 -0
  287. data/test/ral/providers/mount/netinfo.rb +0 -0
  288. data/test/ral/providers/nameservice.rb +0 -0
  289. data/test/ral/providers/package.rb +0 -31
  290. data/test/ral/providers/package/aptitude.rb +1 -2
  291. data/test/ral/providers/package/aptrpm.rb +2 -2
  292. data/test/ral/providers/parsedfile.rb +0 -0
  293. data/test/ral/providers/port/parsed.rb +0 -0
  294. data/test/ral/providers/provider.rb +0 -0
  295. data/test/ral/providers/service/base.rb +0 -0
  296. data/test/ral/providers/service/debian.rb +0 -0
  297. data/test/ral/providers/sshkey/parsed.rb +0 -0
  298. data/test/ral/providers/user.rb +8 -8
  299. data/test/ral/providers/user/useradd.rb +0 -0
  300. data/test/ral/type/basic.rb +0 -0
  301. data/test/ral/type/cron.rb +0 -0
  302. data/test/ral/type/exec.rb +0 -0
  303. data/test/ral/type/file.rb +0 -0
  304. data/test/ral/type/file/target.rb +0 -0
  305. data/test/ral/type/filebucket.rb +0 -0
  306. data/test/ral/type/fileignoresource.rb +0 -0
  307. data/test/ral/type/filesources.rb +1 -3
  308. data/test/ral/type/group.rb +0 -0
  309. data/test/ral/type/host.rb +0 -0
  310. data/test/ral/type/mailalias.rb +1 -2
  311. data/test/ral/type/parameter.rb +0 -0
  312. data/test/ral/type/port.rb +0 -0
  313. data/test/ral/type/property.rb +0 -0
  314. data/test/ral/type/resources.rb +0 -0
  315. data/test/ral/type/service.rb +0 -0
  316. data/test/ral/type/sshkey.rb +0 -0
  317. data/test/ral/type/tidy.rb +0 -0
  318. data/test/ral/type/user.rb +0 -50
  319. data/test/ral/type/yumrepo.rb +7 -1
  320. data/test/ral/type/zone.rb +0 -0
  321. data/test/test +0 -0
  322. data/test/util/autoload.rb +0 -0
  323. data/test/util/classgen.rb +0 -0
  324. data/test/util/execution.rb +0 -0
  325. data/test/util/features.rb +0 -0
  326. data/test/util/fileparsing.rb +0 -0
  327. data/test/util/filetype.rb +0 -0
  328. data/test/util/inifile.rb +0 -0
  329. data/test/util/instance_loader.rb +0 -0
  330. data/test/util/log.rb +0 -59
  331. data/test/util/metrics.rb +0 -0
  332. data/test/util/package.rb +0 -0
  333. data/test/util/pidlock.rb +0 -0
  334. data/test/util/settings.rb +0 -0
  335. data/test/util/storage.rb +0 -0
  336. data/test/util/subclass_loader.rb +0 -0
  337. data/test/util/utiltest.rb +0 -0
  338. metadata +54 -19
  339. data/lib/puppet/metatype/attributes.rb +0 -685
  340. data/lib/puppet/metatype/closure.rb +0 -49
  341. data/lib/puppet/metatype/container.rb +0 -50
  342. data/lib/puppet/metatype/evaluation.rb +0 -163
  343. data/lib/puppet/metatype/instances.rb +0 -305
  344. data/lib/puppet/metatype/metaparams.rb +0 -423
  345. data/lib/puppet/metatype/providers.rb +0 -247
  346. data/lib/puppet/metatype/relationships.rb +0 -115
  347. data/lib/puppet/metatype/schedules.rb +0 -33
  348. data/lib/puppet/metatype/tags.rb +0 -38
  349. data/lib/puppet/util/plist.rb +0 -23
  350. data/lib/puppet/util/plist/generator.rb +0 -225
  351. data/lib/puppet/util/plist/parser.rb +0 -226
  352. data/test/ral/providers/package/apt.rb +0 -169
  353. data/test/ral/providers/package/dpkg.rb +0 -64
  354. data/test/util/posixtest.rb +0 -169
data/CHANGELOG CHANGED
@@ -1,3 +1,207 @@
1
+ 0.24.6
2
+ Adding support to the user type for: profiles, auths, project,
3
+ key/value pairs (extension to Solaris RBAC support added in
4
+ 0.24.6)
5
+
6
+ Fixed #1662 - Configuration Reference still references 'section'
7
+
8
+ Fixed #1460 - enhance redhat puppetmaster init.d script to easy start puppetmaster as a mongrel cluster
9
+
10
+ Fixed #1663 - Regression relating to facter fact naming from 0.24.5
11
+
12
+ Fixed #1655 - Provider::Confine::Variable tests are broken
13
+
14
+ Fixed #1646 - service puppet status does not work as non-root
15
+ on redhat system
16
+
17
+ Fixed #1649 - Updated OSX package cleanup
18
+
19
+ Fixed #1647 - puppetdoc -r providers now working again
20
+
21
+ Fixed #1639 - uninitialized constant Puppet::Type::User::ProviderUseradd
22
+
23
+ Fixed #1637 - With an inexistant (global) templatedir, modules
24
+ can't access their templates
25
+
26
+ Fixed #1202 - Collection attribute matching doesn't parse arrays
27
+
28
+ Fixed #1473 - Puppetd stops with error after puppetmasterd
29
+ is unavailable
30
+
31
+ Fixed #1354 - yum provider problems with RHEL 3
32
+
33
+ Fixed #1633 - Added support for --detailed-exits to bin/puppet
34
+
35
+ Fixed #381 - Allow Allow multiple overrides in one statement
36
+
37
+ Fixing #947 - pluginsync no longer fails poorly when no plugins exist
38
+
39
+ Fixed #981 - Removed 'Adding aliases' info message
40
+
41
+ Fixing #1089 - Log messages are now tagged with the log level,
42
+ making it easier to match messages in the 'tagmail' report.
43
+
44
+ Fixing #1098 - Multiline strings now correctly increment the line count
45
+
46
+ Fixing #1614 - Environments no longer have to be listed out
47
+
48
+ Fixed #1628 - Changed node search to use certname rather than Facter
49
+ hostname
50
+
51
+ Fixed #1613 - The client environment will be substituted when looking
52
+ up settings.
53
+
54
+ Updated puppet binary documentation
55
+
56
+ Feature #1624 - Added RBAC roles to solaris user provider
57
+
58
+ Fixed #1586 - Specifying "fully qualified" package names in Gentoo
59
+
60
+ Fixed #1620 - Add 'sles' to Puppet confines when 'suse' is used
61
+
62
+ Fixed #1585 - Allow complex 'if' and variable expressions
63
+
64
+ Fixed #1564 - Saving File#checksum to state.yaml broken
65
+
66
+ Fixed #1603 - Added support for running Puppet inside a Rack application
67
+ (mod_rails) with Passenger and Apache
68
+
69
+ Fixed #1596 - Deploying file resources with ++ generates error
70
+
71
+ Modified the group and zone resource types to no longer call
72
+ 'currentpropvalues' as a means of setting all values to absent.
73
+ There should be no behaviour change from this change.
74
+
75
+ Modified the behaviour of resource-level 'retrieve' -- it only
76
+ calls 'retrieve' on each property if the resource exists.
77
+
78
+ Fixed #1622 - Users and their groups should again add in one transaction
79
+
80
+ Fixed #791 - You should now be able to create and find a user/group in one transaction.
81
+
82
+ Fixed #1610 - Raise "Filebucketed" messages to Notice priority
83
+
84
+ FIxed #1530 - ssh_authorized_keys provider does not crash anymore on SSH type 1 keys
85
+
86
+ Added a number of confines to package providers
87
+
88
+ Fixed #1609 - Added confines for the Gentoo, FreeBSD and
89
+ SMF (Solaris) service providers
90
+
91
+ Fixed #1608 - Added ubuntu to defaultfor for apt provider
92
+
93
+ Fixed #1607 - Added ubuntu to defaultfor for Debian service
94
+ provider
95
+
96
+ Fixed #1045 - Multiple metaparams all get added to resources.
97
+
98
+ Fixed #1472 -- defined, exported resources in the current compile
99
+ now get expanded correctly.
100
+
101
+ Fixed #1595 - Internally, Property#retrieve is no longer called
102
+ when no 'should' value is available for a resource.
103
+
104
+ Fixed #1588 - Fixed puppetca --clean --all
105
+
106
+ Fixed #1584 - Added support for appended variables
107
+
108
+ Fixed #1554 - Added support for multiple template directories
109
+
110
+ Fixed #1500 - puppetrun not working
111
+
112
+ Fixed #1579 and #1580 - errors in the Puppet RPM spec file
113
+
114
+ Fixed #1572 -- file purging now fails if remote sources do not exist.
115
+
116
+ Fixed #1521 -- ldap user and password are now used with the default connection.
117
+
118
+ Fixed issues with file descriptors leaking into subprocesses
119
+
120
+ Fixed #1568 - createpackage.sh
121
+
122
+ Fixed #1571 - Puppet::Util::binary returns incorrect results
123
+
124
+ Fixed #1553 - Puppet and Facter cannot both install the plist module into two different locations
125
+
126
+ Adjusted hpuxuseradd user provider to confine to HP-UX and fixed HP-UX user provider path regression
127
+
128
+ Fixed debug messages in package type - thanks to Todd Zullinger for this fix
129
+
130
+ Fixed #1566 - changed password property of the user type
131
+
132
+ Fixed debug messages in package type
133
+
134
+ Updated Red Hat spec file
135
+
136
+ Fixes #1455 - Adds HP-UX support for user type
137
+
138
+ Fixes #1551 puppetmaster.freshness xmlrpc call returns incorrect type
139
+
140
+ Fixes #1554 - Fix exception for undefined hostname
141
+
142
+ Fixed #1533 - changed permissions for man directory
143
+
144
+ Added daemontools and runit providers for service type
145
+
146
+ Added simple rake task for running unit tests
147
+
148
+ Added spec Rake task
149
+
150
+ Fixed #1526 - Fixed leak in template
151
+
152
+ Fixed #1506 - Removed storeconfig duplicate indexes
153
+
154
+ Fixed #1457 - case insensitive match for error
155
+
156
+ Fixed #1488 - Moved individual functions out of functions.rb into
157
+ lib/puppet/parser/functions directory. New functions should be create in this directory.
158
+
159
+ Fixed #1508 - Added HP-UX package provider
160
+
161
+ Fixed #1502 - Fixed poor stored configuration performance
162
+
163
+ Fixed #1510 - Storeconfiguration fixed for Rails 2.1
164
+
165
+ Add the -P/--ping option to puppetrun, fixes #1501
166
+
167
+ Fixed #1394 - Added stored configuration clearing script to /ext
168
+
169
+ Fixed #1442 - replaced use of Facter for report titling with certname
170
+
171
+ Fixed $1456 - add proxy configuration capability to yum repo
172
+
173
+ Fixed #1457 - removed confine warning
174
+
175
+ A working script to create an OS X pkg out of the Puppet repository
176
+
177
+ Fixed #1441 - Updated console colours
178
+
179
+ Expose all puppet variables as instance member variables of the template wrapper.
180
+ This helps resolve redmine #1427, by providing a safe mechanism to access variables.
181
+
182
+ * Implement Puppet::Parser::Scope#to_hash, which returns a hash containing all the
183
+ variable bindings in the current and, optionally, parent scope.
184
+ * Use that to set instance member variables into Puppet::Parser::Templatewrapper
185
+ * Report the time taken for variable binding at debug level, to help identify any
186
+ performance regression that is encountered in the real world.
187
+ * Rename the @scope and @file members of the template wrapper, to avoid clashing
188
+ with a scope variable exposed within puppet.
189
+
190
+ Ensure that we consistently use either string #{} interpolation or String.%
191
+ interpolation, not both, to avoid issues where a #{} interpolated value
192
+ contains a % character.
193
+
194
+ Feature #1476: Allow specification of --bindir --sbindir --sitelibdir --mandir --destdir
195
+ in installation
196
+
197
+ Added feature #1241 : Improve performance of group lookups
198
+
199
+ Fixed bug #1448: Puppet CA incorrectly writes out all certs to inventory .txt on each
200
+ certificate signing
201
+
202
+ Fixing puppetlast to make it work with 0.24.5 / 0.25. Made puppetlast work on 0.24.5
203
+ by using the YAML indirector
204
+
1
205
  0.24.5
2
206
  You can now select the encoding format when transferring the catalog,
3
207
  with 'yaml' still being the default but 'marshal' being an option.
@@ -13,6 +217,8 @@
13
217
  The fix for #1431 is actually just removing the tests that exposed
14
218
  this change; the change happened when I refactored how confines work.
15
219
 
220
+ Removed faulty interface type
221
+
16
222
  Updated /spec/unit/rails.rb test
17
223
 
18
224
  Fix #1426 - services on redhat are restarted again and status is
data/Rakefile CHANGED
@@ -144,3 +144,56 @@ task :tracdocs do
144
144
  sh "puppetdoc -m trac -r #{ref.to_s}"
145
145
  end
146
146
  end
147
+
148
+ desc "Run the specs under spec/"
149
+ task :spec do
150
+ require 'spec'
151
+ require 'spec/rake/spectask'
152
+ require 'rcov'
153
+ Spec::Rake::SpecTask.new do |t|
154
+ # t.rcov = true
155
+ t.spec_opts = ['--format','s', '--loadby','mtime']
156
+ t.spec_files = FileList['spec/**/*.rb']
157
+ end
158
+ end
159
+
160
+ desc "Run the unit tests"
161
+ task :unit do
162
+ sh "cd test; rake"
163
+ end
164
+
165
+ desc "Send patch information to the puppet-dev list"
166
+ task :mail_patches do
167
+ if Dir.glob("00*.patch").length > 0
168
+ raise "Patches already exist matching '00*.patch'; clean up first"
169
+ end
170
+
171
+ unless %x{git status} =~ /On branch (.+)/
172
+ raise "Could not get branch from 'git status'"
173
+ end
174
+ branch = $1
175
+
176
+ unless branch =~ %r{^([^\/]+)/([^\/]+)/([^\/]+)$}
177
+ raise "Branch name does not follow <type>/<parent>/<name> model; cannot autodetect parent branch"
178
+ end
179
+
180
+ type, parent, name = $1, $2, $3
181
+
182
+ # Create all of the patches
183
+ sh "git-format-patch -C -M -s -n #{parent}..HEAD"
184
+
185
+ # And then mail them out.
186
+
187
+ # If we've got more than one patch, add --compose
188
+ if Dir.glob("00*.patch").length > 1
189
+ compose = "--compose"
190
+ else
191
+ compose = ""
192
+ end
193
+
194
+ # Now send the mail.
195
+ sh "git send-email #{compose} --no-chain-reply-to --no-signed-off-by-cc --suppress-from --no-thread --to puppet-dev@googlegroups.com 00*.patch"
196
+
197
+ # Finally, clean up the patches
198
+ sh "rm 00*.patch"
199
+ end
File without changes
data/bin/puppet CHANGED
@@ -3,18 +3,18 @@
3
3
  #
4
4
  # = Synopsis
5
5
  #
6
- # Run a stand-alone +puppet+ script.
6
+ # Run a stand-alone +puppet+ manifest.
7
7
  #
8
8
  # = Usage
9
9
  #
10
10
  # puppet [-h|--help] [-V|--version] [-d|--debug] [-v|--verbose]
11
- # [-l|--logdest <file>] <file>
11
+ # [--detailed-exitcodes] [-l|--logdest <file>] <file>
12
12
  #
13
13
  # = Description
14
14
  #
15
- # This is the standalone puppet execution script; use it to execute
16
- # individual scripts that you write. If you need to execute site-wide
17
- # scripts, use +puppetd+ and +puppetmasterd+.
15
+ # This is the standalone puppet execution tool; use it to execute
16
+ # individual manifests that you write. If you need to execute site-wide
17
+ # manifests, use +puppetd+ and +puppetmasterd+.
18
18
  #
19
19
  # = Options
20
20
  #
@@ -31,6 +31,11 @@
31
31
  # debug::
32
32
  # Enable full debugging.
33
33
  #
34
+ # detailed-exitcodes::
35
+ # Provide transaction information via exit codes. If this is enabled, an exit
36
+ # code of '2' means there were changes, and an exit code of '4' means that there
37
+ # were failures during the transaction.
38
+ #
34
39
  # help::
35
40
  # Print this help message
36
41
  #
@@ -48,7 +53,7 @@
48
53
  #
49
54
  # = Example
50
55
  #
51
- # puppet -l /tmp/script.log script.pp
56
+ # puppet -l /tmp/manifest.log manifest.pp
52
57
  #
53
58
  # = Author
54
59
  #
@@ -72,6 +77,7 @@ options = [
72
77
  [ "--loadclasses", "-L", GetoptLong::NO_ARGUMENT ],
73
78
  [ "--verbose", "-v", GetoptLong::NO_ARGUMENT ],
74
79
  [ "--use-nodes", GetoptLong::NO_ARGUMENT ],
80
+ [ "--detailed-exitcodes", GetoptLong::NO_ARGUMENT ],
75
81
  [ "--version", "-V", GetoptLong::NO_ARGUMENT ]
76
82
  ]
77
83
 
@@ -87,7 +93,8 @@ options = {
87
93
  :logfile => false,
88
94
  :loadclasses => false,
89
95
  :logset => false,
90
- :code => nil
96
+ :code => nil,
97
+ :detailed_exits => false,
91
98
  }
92
99
 
93
100
 
@@ -118,6 +125,8 @@ begin
118
125
  options[:code] = arg
119
126
  when "--loadclasses"
120
127
  options[:loadclasses] = true
128
+ when "--detailed-exitcodes"
129
+ options[:detailed_exits] = true
121
130
  when "--logdest"
122
131
  begin
123
132
  Puppet::Util::Log.newdestination(arg)
@@ -183,11 +192,12 @@ if Puppet[:parseonly]
183
192
  end
184
193
 
185
194
  # Collect our facts.
186
- facts = Puppet::Node::Facts.find("me")
187
- facts.name = facts.values["hostname"]
195
+ facts = Puppet::Node::Facts.find(Puppet[:certname])
188
196
 
189
197
  # Find our Node
190
- node = Puppet::Node.find(facts.name)
198
+ unless node = Puppet::Node.find(Puppet[:certname])
199
+ raise "Could not find node %s" % Puppet[:certname]
200
+ end
191
201
 
192
202
  # Merge in the facts.
193
203
  node.merge(facts.values)
@@ -207,6 +217,7 @@ end
207
217
 
208
218
  begin
209
219
  # Compile our catalog
220
+ starttime = Time.now
210
221
  catalog = Puppet::Node::Catalog.find(node.name, :use_node => node)
211
222
 
212
223
  # Translate it to a RAL catalog
@@ -216,8 +227,18 @@ begin
216
227
 
217
228
  catalog.finalize
218
229
 
230
+ catalog.retrieval_duration = Time.now - starttime
231
+
219
232
  # And apply it
220
- catalog.apply
233
+ transaction = catalog.apply
234
+
235
+ status = 0
236
+ if not Puppet[:noop] and options[:detailed_exits] then
237
+ transaction.generate_report
238
+ status |= 2 if transaction.report.metrics["changes"][:total] > 0
239
+ status |= 4 if transaction.report.metrics["resources"][:failed] > 0
240
+ end
241
+ exit(status)
221
242
  rescue => detail
222
243
  if Puppet[:trace]
223
244
  puts detail.backtrace
@@ -225,6 +225,7 @@ when :clean
225
225
 
226
226
  if all
227
227
  certs = ca.list
228
+ certs |= ca.list_signed
228
229
  if certs.empty?
229
230
  $stderr.puts "No certificates to clean"
230
231
  exit(24)
File without changes
File without changes
File without changes
@@ -9,7 +9,7 @@
9
9
  #
10
10
  # puppetrun [-a|--all] [-c|--class <class>] [-d|--debug] [-f|--foreground]
11
11
  # [-h|--help] [--host <host>] [--no-fqdn] [--ignoreschedules]
12
- # [-t|--tag <tag>] [--test]
12
+ # [-t|--tag <tag>] [--test] [-p|--ping]
13
13
  #
14
14
  # = Description
15
15
  #
@@ -108,6 +108,10 @@
108
108
  # Print the hosts you would connect to but do not actually connect. This
109
109
  # option requires LDAP support at this point.
110
110
  #
111
+ # ping::
112
+ #
113
+ # Do a ICMP echo against the target host. Skip hosts that don't respond to ping.
114
+ #
111
115
  # = Example
112
116
  #
113
117
  # sudo puppetrun -p 10 --host host1 --host host2 -t remotefile -t webserver
@@ -154,6 +158,7 @@ flags = [
154
158
  [ "--help", "-h", GetoptLong::NO_ARGUMENT ],
155
159
  [ "--host", GetoptLong::REQUIRED_ARGUMENT ],
156
160
  [ "--parallel", "-p", GetoptLong::REQUIRED_ARGUMENT ],
161
+ [ "--ping", "-P", GetoptLong::NO_ARGUMENT ],
157
162
  [ "--no-fqdn", "-n", GetoptLong::NO_ARGUMENT ],
158
163
  [ "--test", GetoptLong::NO_ARGUMENT ],
159
164
  [ "--version", "-V", GetoptLong::NO_ARGUMENT ]
@@ -168,6 +173,7 @@ options = {
168
173
  :ignoreschedules => false,
169
174
  :foreground => false,
170
175
  :parallel => 1,
176
+ :ping => false,
171
177
  :debug => false,
172
178
  :test => false,
173
179
  :all => false,
@@ -215,6 +221,8 @@ begin
215
221
  $stderr.puts "Could not convert %s to an integer" % arg.inspect
216
222
  exit(23)
217
223
  end
224
+ when "--ping"
225
+ options[:ping] = true
218
226
  when "--foreground"
219
227
  options[:foreground] = true
220
228
  when "--debug"
@@ -237,7 +245,7 @@ end
237
245
  # Now parse the config
238
246
  Puppet.parse_config
239
247
 
240
- if Puppet[:node_terminus] = "ldap"
248
+ if Puppet[:node_terminus] == "ldap" and (options[:all] or classes)
241
249
  if options[:all]
242
250
  hosts = Puppet::Node.search("whatever").collect { |node| node.name }
243
251
  puts "all: %s" % hosts.join(", ")
@@ -294,12 +302,12 @@ while go
294
302
  if children.length < options[:parallel] and ! todo.empty?
295
303
  host = todo.shift
296
304
  pid = fork do
297
- # First make sure the client is up
298
- out = %x{ping -c 1 #{host}}
299
-
300
- unless $? == 0
301
- $stderr.print "Could not contact %s\n" % host
302
- next
305
+ if options[:ping]
306
+ out = %x{ping -c 1 #{host}}
307
+ unless $? == 0
308
+ $stderr.print "Could not contact %s\n" % host
309
+ next
310
+ end
303
311
  end
304
312
  client = Puppet::Network::Client.runner.new(
305
313
  :Server => host,