puppet 0.25.0 → 0.25.1
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 +4772 -19114
- data/README +1 -1
- data/Rakefile +7 -25
- data/{sbin → bin}/puppetca +0 -0
- data/{sbin → bin}/puppetd +0 -0
- data/{sbin → bin}/puppetmasterd +0 -0
- data/{sbin → bin}/puppetqd +0 -0
- data/{sbin → bin}/puppetrun +0 -0
- data/conf/osx/createpackage.sh +1 -1
- data/conf/redhat/client.init +6 -3
- data/conf/redhat/puppet.spec +26 -14
- data/conf/redhat/server.init +3 -2
- data/ext/vim/syntax/puppet.vim +4 -1
- data/install.rb +25 -7
- data/lib/puppet.rb +1 -1
- data/lib/puppet/agent.rb +2 -2
- data/lib/puppet/application/puppet.rb +3 -3
- data/lib/puppet/application/puppetd.rb +0 -7
- data/lib/puppet/application/puppetdoc.rb +1 -0
- data/lib/puppet/application/puppetmasterd.rb +2 -2
- data/lib/puppet/configurer.rb +6 -1
- data/lib/puppet/configurer/fact_handler.rb +2 -2
- data/lib/puppet/defaults.rb +2 -2
- data/lib/puppet/external/nagios/base.rb +4 -3
- data/lib/puppet/external/pson/common.rb +367 -0
- data/lib/puppet/external/pson/pure.rb +77 -0
- data/lib/puppet/external/pson/pure/generator.rb +429 -0
- data/lib/puppet/external/pson/pure/parser.rb +269 -0
- data/lib/puppet/external/pson/version.rb +8 -0
- data/lib/puppet/feature/pson.rb +6 -0
- data/lib/puppet/feature/rails.rb +1 -5
- data/lib/puppet/file_serving/configuration.rb +2 -2
- data/lib/puppet/indirector/certificate/rest.rb +6 -0
- data/lib/puppet/indirector/facts/facter.rb +1 -1
- data/lib/puppet/indirector/ldap.rb +1 -1
- data/lib/puppet/indirector/queue.rb +3 -3
- data/lib/puppet/indirector/rest.rb +1 -1
- data/lib/puppet/network/authstore.rb +34 -53
- data/lib/puppet/network/formats.rb +59 -9
- data/lib/puppet/network/http/mongrel/rest.rb +10 -9
- data/lib/puppet/network/http/webrick.rb +8 -1
- data/lib/puppet/network/http/webrick/rest.rb +2 -5
- data/lib/puppet/network/http_server/webrick.rb +1 -4
- data/lib/puppet/parser/ast/leaf.rb +1 -3
- data/lib/puppet/parser/collector.rb +14 -8
- data/lib/puppet/parser/compiler.rb +7 -0
- data/lib/puppet/parser/functions/fqdn_rand.rb +4 -10
- data/lib/puppet/parser/functions/regsubst.rb +44 -30
- data/lib/puppet/parser/functions/require.rb +18 -3
- data/lib/puppet/parser/functions/versioncmp.rb +1 -1
- data/lib/puppet/parser/interpreter.rb +1 -1
- data/lib/puppet/parser/lexer.rb +29 -31
- data/lib/puppet/parser/loaded_code.rb +4 -0
- data/lib/puppet/parser/parser_support.rb +5 -2
- data/lib/puppet/parser/resource.rb +31 -6
- data/lib/puppet/property.rb +3 -2
- data/lib/puppet/provider/macauthorization/macauthorization.rb +14 -14
- data/lib/puppet/provider/package/dpkg.rb +1 -1
- data/lib/puppet/provider/package/portage.rb +15 -5
- data/lib/puppet/provider/package/rug.rb +1 -1
- data/lib/puppet/provider/package/up2date.rb +1 -1
- data/lib/puppet/provider/package/urpmi.rb +1 -1
- data/lib/puppet/provider/service/daemontools.rb +7 -10
- data/lib/puppet/provider/service/runit.rb +7 -17
- data/lib/puppet/provider/ssh_authorized_key/parsed.rb +7 -47
- data/lib/puppet/provider/zone/solaris.rb +12 -3
- data/lib/puppet/relationship.rb +12 -12
- data/lib/puppet/reports/rrdgraph.rb +1 -1
- data/lib/puppet/reports/store.rb +2 -2
- data/lib/puppet/reports/tagmail.rb +5 -16
- data/lib/puppet/resource.rb +15 -20
- data/lib/puppet/resource/catalog.rb +40 -29
- data/lib/puppet/ssl/certificate_revocation_list.rb +0 -2
- data/lib/puppet/ssl/host.rb +2 -3
- data/lib/puppet/sslcertificates/ca.rb +0 -5
- data/lib/puppet/type/cron.rb +1 -1
- data/lib/puppet/type/file/owner.rb +7 -4
- data/lib/puppet/type/resources.rb +17 -17
- data/lib/puppet/type/yumrepo.rb +10 -3
- data/lib/puppet/util.rb +6 -11
- data/lib/puppet/util/inifile.rb +8 -0
- data/lib/puppet/util/log.rb +2 -2
- data/lib/puppet/util/monkey_patches.rb +0 -43
- data/lib/puppet/util/{json.rb → pson.rb} +6 -6
- data/lib/puppet/util/rdoc.rb +5 -3
- data/lib/puppet/util/selinux.rb +12 -6
- data/lib/puppet/util/settings.rb +25 -16
- data/lib/puppet/util/settings/file_setting.rb +4 -2
- data/spec/integration/application/puppet.rb +4 -4
- data/spec/integration/defaults.rb +2 -2
- data/spec/integration/indirector/catalog/queue.rb +5 -5
- data/spec/integration/indirector/certificate/rest.rb +3 -1
- data/spec/integration/network/formats.rb +36 -36
- data/spec/integration/parser/functions/require.rb +5 -3
- data/spec/integration/provider/mailalias/aliases.rb +4 -4
- data/spec/integration/resource/catalog.rb +4 -4
- data/spec/unit/application/puppet.rb +16 -15
- data/spec/unit/application/puppetd.rb +1 -1
- data/spec/unit/application/puppetdoc.rb +6 -0
- data/spec/unit/application/puppetmasterd.rb +6 -6
- data/spec/unit/configurer/fact_handler.rb +3 -3
- data/spec/unit/file_serving/configuration.rb +16 -2
- data/spec/unit/indirector/certificate/rest.rb +34 -0
- data/spec/unit/indirector/queue.rb +15 -15
- data/spec/unit/indirector/rest.rb +31 -9
- data/spec/unit/network/authstore.rb +105 -26
- data/spec/unit/network/formats.rb +124 -39
- data/spec/unit/parser/ast/leaf.rb +15 -0
- data/spec/unit/parser/collector.rb +20 -9
- data/spec/unit/parser/compiler.rb +19 -0
- data/spec/unit/parser/functions/fqdn_rand.rb +62 -0
- data/spec/unit/parser/functions/regsubst.rb +80 -0
- data/spec/unit/parser/functions/require.rb +19 -7
- data/spec/unit/parser/interpreter.rb +2 -2
- data/spec/unit/parser/lexer.rb +32 -7
- data/spec/unit/parser/loaded_code.rb +18 -1
- data/spec/unit/parser/parser.rb +10 -2
- data/spec/unit/parser/resource.rb +53 -2
- data/spec/unit/parser/scope.rb +1 -1
- data/spec/unit/property.rb +14 -4
- data/spec/unit/provider/package/dpkg.rb +7 -0
- data/spec/unit/provider/service/daemontools.rb +19 -2
- data/spec/unit/provider/service/redhat.rb +2 -0
- data/spec/unit/provider/service/runit.rb +15 -4
- data/spec/unit/provider/ssh_authorized_key/parsed.rb +32 -55
- data/spec/unit/relationship.rb +21 -46
- data/spec/unit/resource.rb +30 -39
- data/spec/unit/resource/catalog.rb +66 -51
- data/spec/unit/ssl/certificate_revocation_list.rb +0 -12
- data/spec/unit/type/cron.rb +33 -0
- data/spec/unit/type/file/owner.rb +10 -4
- data/spec/unit/util/json.rb +9 -9
- data/spec/unit/util/log.rb +36 -0
- data/spec/unit/util/settings.rb +6 -0
- data/test/data/providers/ssh_authorized_key/parsed/authorized_keys2 +1 -0
- data/test/lib/puppettest/support/utils.rb +8 -16
- metadata +36 -13
- data/lib/puppet/feature/json.rb +0 -2
data/README
CHANGED
@@ -21,7 +21,7 @@ Generally, you need the following things installed:
|
|
21
21
|
running 'ruby -rxmlrpc/client -e "puts :yep"'. If that errors out, you're missing
|
22
22
|
the library.
|
23
23
|
|
24
|
-
* Facter => 1.
|
24
|
+
* Facter => 1.5.1
|
25
25
|
You can get this from < http://reductivelabs.com/projects/facter >
|
26
26
|
|
27
27
|
$Id$
|
data/Rakefile
CHANGED
@@ -3,13 +3,13 @@
|
|
3
3
|
$: << File.expand_path('lib')
|
4
4
|
$LOAD_PATH << File.join(File.dirname(__FILE__), 'tasks')
|
5
5
|
|
6
|
-
Dir['tasks/**/*.rake'].each { |t| load t }
|
7
|
-
|
8
6
|
require './lib/puppet.rb'
|
9
7
|
require 'rake'
|
10
8
|
require 'rake/packagetask'
|
11
9
|
require 'rake/gempackagetask'
|
12
10
|
|
11
|
+
Dir['tasks/**/*.rake'].each { |t| load t }
|
12
|
+
|
13
13
|
FILES = FileList[
|
14
14
|
'[A-Z]*',
|
15
15
|
'install.rb',
|
@@ -24,36 +24,18 @@ FILES = FileList[
|
|
24
24
|
'spec/**/*'
|
25
25
|
]
|
26
26
|
|
27
|
-
task :default do
|
28
|
-
sh %{rake -T}
|
29
|
-
end
|
30
|
-
|
31
|
-
spec = Gem::Specification.new do |spec|
|
32
|
-
spec.platform = Gem::Platform::RUBY
|
33
|
-
spec.name = 'puppet'
|
34
|
-
spec.files = FILES.to_a
|
35
|
-
spec.version = Puppet::PUPPETVERSION
|
36
|
-
spec.summary = 'Puppet, an automated configuration management tool'
|
37
|
-
spec.author = 'Reductive Labs'
|
38
|
-
spec.email = 'puppet@reductivelabs.com'
|
39
|
-
spec.homepage = 'http://reductivelabs.com'
|
40
|
-
spec.rubyforge_project = 'puppet'
|
41
|
-
spec.has_rdoc = true
|
42
|
-
spec.rdoc_options <<
|
43
|
-
'--title' << 'Puppet - Configuration Management' <<
|
44
|
-
'--main' << 'README' <<
|
45
|
-
'--line-numbers'
|
46
|
-
end
|
47
|
-
|
48
27
|
Rake::PackageTask.new("puppet", Puppet::PUPPETVERSION) do |pkg|
|
49
28
|
pkg.package_dir = 'pkg'
|
50
29
|
pkg.need_tar_gz = true
|
51
30
|
pkg.package_files = FILES.to_a
|
52
31
|
end
|
53
32
|
|
54
|
-
|
33
|
+
task :default do
|
34
|
+
sh %{rake -T}
|
55
35
|
end
|
56
36
|
|
37
|
+
task :puppetpackages => [:create_gem, :package]
|
38
|
+
|
57
39
|
desc "Run the specs under spec/"
|
58
40
|
task :spec do
|
59
41
|
require 'spec'
|
@@ -68,7 +50,7 @@ task :spec do
|
|
68
50
|
t.spec_files = FileList['spec/**/*.rb']
|
69
51
|
if defined?(Rcov)
|
70
52
|
t.rcov = true
|
71
|
-
t.rcov_opts = ['--exclude', 'spec/*,test/*,results/*,/usr/lib/*']
|
53
|
+
t.rcov_opts = ['--exclude', 'spec/*,test/*,results/*,/usr/lib/*,/usr/local/lib/*']
|
72
54
|
end
|
73
55
|
end
|
74
56
|
end
|
data/{sbin → bin}/puppetca
RENAMED
File without changes
|
data/{sbin → bin}/puppetd
RENAMED
File without changes
|
data/{sbin → bin}/puppetmasterd
RENAMED
File without changes
|
data/{sbin → bin}/puppetqd
RENAMED
File without changes
|
data/{sbin → bin}/puppetrun
RENAMED
File without changes
|
data/conf/osx/createpackage.sh
CHANGED
data/conf/redhat/client.init
CHANGED
@@ -25,7 +25,10 @@ RETVAL=0
|
|
25
25
|
PUPPET_OPTS=""
|
26
26
|
[ -n "${PUPPET_SERVER}" ] && PUPPET_OPTS="--server=${PUPPET_SERVER}"
|
27
27
|
[ -n "$PUPPET_LOG" ] && PUPPET_OPTS="${PUPPET_OPTS} --logdest=${PUPPET_LOG}"
|
28
|
-
[ -n "$PUPPET_PORT" ] && PUPPET_OPTS="${PUPPET_OPTS} --
|
28
|
+
[ -n "$PUPPET_PORT" ] && PUPPET_OPTS="${PUPPET_OPTS} --masterport=${PUPPET_PORT}"
|
29
|
+
|
30
|
+
# Determine if we can use the -p option to killproc. RHEL < 5 can't.
|
31
|
+
killproc | grep -q -- '-p' 2>/dev/null && killopts="-p $pidfile"
|
29
32
|
|
30
33
|
# Figure out if the system just booted. Let's assume
|
31
34
|
# boot doesn't take longer than 5 minutes
|
@@ -43,7 +46,7 @@ start() {
|
|
43
46
|
|
44
47
|
stop() {
|
45
48
|
echo -n $"Stopping puppet: "
|
46
|
-
killproc $puppetd
|
49
|
+
killproc $killopts $puppetd
|
47
50
|
RETVAL=$?
|
48
51
|
echo
|
49
52
|
[ $RETVAL = 0 ] && rm -f ${lockfile} ${pidfile}
|
@@ -51,7 +54,7 @@ stop() {
|
|
51
54
|
|
52
55
|
reload() {
|
53
56
|
echo -n $"Restarting puppet: "
|
54
|
-
killproc $puppetd -HUP
|
57
|
+
killproc $killopts $puppetd -HUP
|
55
58
|
RETVAL=$?
|
56
59
|
echo
|
57
60
|
return $RETVAL
|
data/conf/redhat/puppet.spec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
%define confdir conf/redhat
|
6
6
|
|
7
7
|
Name: puppet
|
8
|
-
Version: 0.25.
|
8
|
+
Version: 0.25.1
|
9
9
|
Release: 1%{?dist}
|
10
10
|
Summary: A network tool for managing many disparate systems
|
11
11
|
License: GPLv2+
|
@@ -124,17 +124,19 @@ install -Dp -m0644 ext/vim/syntax/puppet.vim $vimdir/syntax/puppet.vim
|
|
124
124
|
%files
|
125
125
|
%defattr(-, root, root, 0755)
|
126
126
|
%doc CHANGELOG COPYING LICENSE README examples
|
127
|
-
%
|
127
|
+
%{_bindir}/pi
|
128
128
|
%{_bindir}/puppet
|
129
129
|
%{_bindir}/ralsh
|
130
130
|
%{_bindir}/filebucket
|
131
131
|
%{_bindir}/puppetdoc
|
132
|
+
%{_sbindir}/puppetca
|
132
133
|
%{_sbindir}/puppetd
|
133
134
|
%{ruby_sitelibdir}/*
|
134
135
|
%{_initrddir}/puppet
|
135
136
|
%dir %{_sysconfdir}/puppet
|
136
137
|
%config(noreplace) %{_sysconfdir}/sysconfig/puppet
|
137
138
|
%config(noreplace) %{_sysconfdir}/puppet/puppet.conf
|
139
|
+
%ghost %config(noreplace,missingok) %{_sysconfdir}/puppet/puppetca.conf
|
138
140
|
%ghost %config(noreplace,missingok) %{_sysconfdir}/puppet/puppetd.conf
|
139
141
|
%config(noreplace) %{_sysconfdir}/logrotate.d/puppet
|
140
142
|
# We don't want to require emacs or vim, so we need to own these dirs
|
@@ -146,12 +148,13 @@ install -Dp -m0644 ext/vim/syntax/puppet.vim $vimdir/syntax/puppet.vim
|
|
146
148
|
%attr(-, puppet, puppet) %{_localstatedir}/run/puppet
|
147
149
|
%attr(-, puppet, puppet) %{_localstatedir}/log/puppet
|
148
150
|
%attr(-, puppet, puppet) %{_localstatedir}/lib/puppet
|
149
|
-
%
|
150
|
-
%
|
151
|
-
%
|
152
|
-
%
|
153
|
-
%
|
154
|
-
%
|
151
|
+
%{_mandir}/man8/pi.8.gz
|
152
|
+
%{_mandir}/man8/puppet.8.gz
|
153
|
+
%{_mandir}/man8/puppet.conf.8.gz
|
154
|
+
%{_mandir}/man8/puppetca.8.gz
|
155
|
+
%{_mandir}/man8/puppetd.8.gz
|
156
|
+
%{_mandir}/man8/ralsh.8.gz
|
157
|
+
%{_mandir}/man8/puppetdoc.8.gz
|
155
158
|
|
156
159
|
%files server
|
157
160
|
%defattr(-, root, root, 0755)
|
@@ -162,13 +165,10 @@ install -Dp -m0644 ext/vim/syntax/puppet.vim $vimdir/syntax/puppet.vim
|
|
162
165
|
%config(noreplace) %{_sysconfdir}/puppet/fileserver.conf
|
163
166
|
%dir %{_sysconfdir}/puppet/manifests
|
164
167
|
%config(noreplace) %{_sysconfdir}/sysconfig/puppetmaster
|
165
|
-
%ghost %config(noreplace,missingok) %{_sysconfdir}/puppet/puppetca.conf
|
166
168
|
%ghost %config(noreplace,missingok) %{_sysconfdir}/puppet/puppetmasterd.conf
|
167
|
-
%{
|
168
|
-
%
|
169
|
-
%
|
170
|
-
%doc %{_mandir}/man8/puppetmasterd.8.gz
|
171
|
-
%doc %{_mandir}/man8/puppetrun.8.gz
|
169
|
+
%{_mandir}/man8/filebucket.8.gz
|
170
|
+
%{_mandir}/man8/puppetmasterd.8.gz
|
171
|
+
%{_mandir}/man8/puppetrun.8.gz
|
172
172
|
|
173
173
|
# Fixed uid/gid were assigned in bz 472073 (Fedora), 471918 (RHEL-5),
|
174
174
|
# and 471919 (RHEL-4)
|
@@ -214,6 +214,18 @@ fi
|
|
214
214
|
rm -rf %{buildroot}
|
215
215
|
|
216
216
|
%changelog
|
217
|
+
* Tue Oct 20 2009 Todd Zullinger <tmz@pobox.com> - 0.25.1-1
|
218
|
+
- Update to 0.25.1
|
219
|
+
- Include the pi program and man page (R.I.Pienaar)
|
220
|
+
|
221
|
+
* Sat Oct 17 2009 Todd Zullinger <tmz@pobox.com> - 0.25.1-0.2.rc2
|
222
|
+
- Update to 0.25.1rc2
|
223
|
+
|
224
|
+
* Tue Sep 22 2009 Todd Zullinger <tmz@pobox.com> - 0.25.1-0.1.rc1
|
225
|
+
- Update to 0.25.1rc1
|
226
|
+
- Move puppetca to puppet package, it has uses on client systems
|
227
|
+
- Drop redundant %%doc from manpage %%file listings
|
228
|
+
|
217
229
|
* Fri Sep 04 2009 Todd Zullinger <tmz@pobox.com> - 0.25.0-1
|
218
230
|
- Update to 0.25.0
|
219
231
|
- Fix permissions on /var/log/puppet (#495096)
|
data/conf/redhat/server.init
CHANGED
@@ -71,8 +71,9 @@ stop() {
|
|
71
71
|
ret=$?; [ $ret != 0 ] && RETVAL=$ret
|
72
72
|
done
|
73
73
|
else
|
74
|
-
|
75
|
-
|
74
|
+
killproc | grep -q -- '-p' 2>/dev/null && killopts="-p $pidfile"
|
75
|
+
killproc $killopts $PUPPETMASTER
|
76
|
+
RETVAL=$?
|
76
77
|
fi
|
77
78
|
echo
|
78
79
|
[ $RETVAL -eq 0 ] && rm -f "$lockfile"
|
data/ext/vim/syntax/puppet.vim
CHANGED
@@ -17,7 +17,7 @@ elseif exists("b:current_syntax")
|
|
17
17
|
endif
|
18
18
|
|
19
19
|
" match class/definition/node declarations
|
20
|
-
syn region puppetDefine start="^\s*\(class\|define\|node\)\s" end="{" contains=puppetDefType,puppetDefName,puppetDefArguments
|
20
|
+
syn region puppetDefine start="^\s*\(class\|define\|node\)\s" end="{" contains=puppetDefType,puppetDefName,puppetDefArguments,puppetNodeRe
|
21
21
|
syn keyword puppetDefType class define node inherits contained
|
22
22
|
syn region puppetDefArguments start="(" end=")" contains=puppetArgument
|
23
23
|
syn match puppetArgument "\w\+" contained
|
@@ -25,6 +25,7 @@ syn match puppetArgument "\$\w\+" contained
|
|
25
25
|
syn match puppetArgument "'[^']+'" contained
|
26
26
|
syn match puppetArgument '"[^"]+"' contained
|
27
27
|
syn match puppetDefName "\w\+" contained
|
28
|
+
syn match puppetNodeRe "/.*/" contained
|
28
29
|
|
29
30
|
" match 'foo' in 'class foo { ...'
|
30
31
|
" match 'foo::bar' in 'class foo::bar { ...'
|
@@ -60,6 +61,7 @@ syn match puppetVariable "${\w\+}"
|
|
60
61
|
" don't match variables if preceded by a backslash.
|
61
62
|
syn region puppetString start=+'+ skip=+\\\\\|\\'+ end=+'+
|
62
63
|
syn region puppetString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=puppetVariable,puppetNotVariable
|
64
|
+
syn match puppetString "/.*/"
|
63
65
|
syn match puppetNotVariable "\\$\w\+" contained
|
64
66
|
syn match puppetNotVariable "\\${\w\+}" contained
|
65
67
|
|
@@ -97,6 +99,7 @@ if version >= 508 || !exists("did_puppet_syn_inits")
|
|
97
99
|
HiLink puppetControl Statement
|
98
100
|
HiLink puppetDefType Define
|
99
101
|
HiLink puppetDefName Type
|
102
|
+
HiLink puppetNodeRe Type
|
100
103
|
HiLink puppetTypeName Statement
|
101
104
|
HiLink puppetTypeDefault Type
|
102
105
|
HiLink puppetParamName Identifier
|
data/install.rb
CHANGED
@@ -35,7 +35,13 @@
|
|
35
35
|
require 'rbconfig'
|
36
36
|
require 'find'
|
37
37
|
require 'fileutils'
|
38
|
-
|
38
|
+
begin
|
39
|
+
require 'ftools' # apparently on some system ftools doesn't get loaded
|
40
|
+
$haveftools = true
|
41
|
+
rescue LoadError
|
42
|
+
puts "ftools not found. Using FileUtils instead.."
|
43
|
+
$haveftools = false
|
44
|
+
end
|
39
45
|
require 'optparse'
|
40
46
|
require 'ostruct'
|
41
47
|
|
@@ -92,9 +98,15 @@ def do_libs(libs, strip = 'lib/')
|
|
92
98
|
libs.each do |lf|
|
93
99
|
olf = File.join(InstallOptions.site_dir, lf.gsub(/#{strip}/, ''))
|
94
100
|
op = File.dirname(olf)
|
95
|
-
|
96
|
-
|
97
|
-
|
101
|
+
if $haveftools
|
102
|
+
File.makedirs(op, true)
|
103
|
+
File.chmod(0755, op)
|
104
|
+
File.install(lf, olf, 0644, true)
|
105
|
+
else
|
106
|
+
FileUtils.makedirs(op, {:mode => 0755, :verbose => true})
|
107
|
+
FileUtils.chmod(0755, op)
|
108
|
+
FileUtils.install(lf, olf, {:mode => 0644, :verbose => true})
|
109
|
+
end
|
98
110
|
end
|
99
111
|
end
|
100
112
|
|
@@ -102,9 +114,15 @@ def do_man(man, strip = 'man/')
|
|
102
114
|
man.each do |mf|
|
103
115
|
omf = File.join(InstallOptions.man_dir, mf.gsub(/#{strip}/, ''))
|
104
116
|
om = File.dirname(omf)
|
105
|
-
|
106
|
-
|
107
|
-
|
117
|
+
if $haveftools
|
118
|
+
File.makedirs(om, true)
|
119
|
+
File.chmod(0755, om)
|
120
|
+
File.install(mf, omf, 0644, true)
|
121
|
+
else
|
122
|
+
FileUtils.makedirs(om, {:mode => 0755, :verbose => true})
|
123
|
+
FileUtils.chmod(0755, om)
|
124
|
+
FileUtils.install(mf, omf, {:mode => 0644, :verbose => true})
|
125
|
+
end
|
108
126
|
gzip = %x{which gzip}
|
109
127
|
gzip.chomp!
|
110
128
|
%x{#{gzip} -f #{omf}}
|
data/lib/puppet.rb
CHANGED
data/lib/puppet/agent.rb
CHANGED
@@ -122,9 +122,9 @@ class Puppet::Agent
|
|
122
122
|
def with_client
|
123
123
|
begin
|
124
124
|
@client = client_class.new
|
125
|
-
rescue =>
|
125
|
+
rescue => detail
|
126
126
|
puts detail.backtrace if Puppet[:trace]
|
127
|
-
Puppet.err "Could not create instance of %s: %s" % [client_class,
|
127
|
+
Puppet.err "Could not create instance of %s: %s" % [client_class, detail]
|
128
128
|
return
|
129
129
|
end
|
130
130
|
yield @client
|
@@ -49,12 +49,12 @@ Puppet::Application.new(:puppet) do
|
|
49
49
|
end
|
50
50
|
|
51
51
|
begin
|
52
|
-
catalog =
|
52
|
+
catalog = PSON.parse(text)
|
53
53
|
unless catalog.is_a?(Puppet::Resource::Catalog)
|
54
|
-
catalog = Puppet::Resource::Catalog.
|
54
|
+
catalog = Puppet::Resource::Catalog.pson_create(catalog)
|
55
55
|
end
|
56
56
|
rescue => detail
|
57
|
-
raise Puppet::Error, "Could not deserialize catalog from
|
57
|
+
raise Puppet::Error, "Could not deserialize catalog from pson: %s" % detail
|
58
58
|
end
|
59
59
|
|
60
60
|
catalog = catalog.to_ral
|
@@ -160,13 +160,6 @@ Puppet::Application.new(:puppetd) do
|
|
160
160
|
exit(14)
|
161
161
|
end
|
162
162
|
|
163
|
-
# FIXME: we should really figure out how to distribute the CRL
|
164
|
-
# to clients. In the meantime, we just disable CRL checking if
|
165
|
-
# the CRL file doesn't exist
|
166
|
-
unless File::exist?(Puppet[:cacrl])
|
167
|
-
Puppet[:cacrl] = 'false'
|
168
|
-
end
|
169
|
-
|
170
163
|
handlers = nil
|
171
164
|
|
172
165
|
if options[:serve].empty?
|
@@ -53,13 +53,13 @@ Puppet::Application.new(:puppetmasterd) do
|
|
53
53
|
|
54
54
|
command(:compile) do
|
55
55
|
Puppet::Util::Log.newdestination :console
|
56
|
-
raise ArgumentError, "Cannot render compiled catalogs without
|
56
|
+
raise ArgumentError, "Cannot render compiled catalogs without pson support" unless Puppet.features.pson?
|
57
57
|
begin
|
58
58
|
unless catalog = Puppet::Resource::Catalog.find(options[:node])
|
59
59
|
raise "Could not compile catalog for %s" % options[:node]
|
60
60
|
end
|
61
61
|
|
62
|
-
$stdout.puts catalog.render(:
|
62
|
+
$stdout.puts catalog.render(:pson)
|
63
63
|
rescue => detail
|
64
64
|
$stderr.puts detail
|
65
65
|
exit(30)
|
data/lib/puppet/configurer.rb
CHANGED
@@ -133,7 +133,12 @@ class Puppet::Configurer
|
|
133
133
|
# This just passes any options on to the catalog,
|
134
134
|
# which accepts :tags and :ignoreschedules.
|
135
135
|
def run(options = {})
|
136
|
-
|
136
|
+
begin
|
137
|
+
prepare()
|
138
|
+
rescue Exception => detail
|
139
|
+
puts detail.backtrace if Puppet[:trace]
|
140
|
+
Puppet.err "Failed to prepare catalog: %s" % detail
|
141
|
+
end
|
137
142
|
|
138
143
|
if catalog = options[:catalog]
|
139
144
|
options.delete(:catalog)
|
@@ -29,11 +29,11 @@ module Puppet::Configurer::FactHandler
|
|
29
29
|
#format = facts.class.default_format
|
30
30
|
|
31
31
|
# Hard-code yaml, because I couldn't get marshal to work.
|
32
|
-
format = :
|
32
|
+
format = :b64_zlib_yaml
|
33
33
|
|
34
34
|
text = facts.render(format)
|
35
35
|
|
36
|
-
return {:facts_format =>
|
36
|
+
return {:facts_format => :b64_zlib_yaml, :facts => CGI.escape(text)}
|
37
37
|
end
|
38
38
|
|
39
39
|
# Retrieve facts from the central server.
|
data/lib/puppet/defaults.rb
CHANGED
@@ -168,7 +168,7 @@ module Puppet
|
|
168
168
|
:queue_source => ["stomp://localhost:61613/", "Which type of queue to use for asynchronous processing. If your stomp server requires
|
169
169
|
authentication, you can include it in the URI as long as your stomp client library is at least 1.1.1"],
|
170
170
|
:async_storeconfigs => {:default => false, :desc => "Whether to use a queueing system to provide asynchronous database integration.
|
171
|
-
Requires that ``puppetqd`` be running and that '
|
171
|
+
Requires that ``puppetqd`` be running and that 'PSON' support for ruby be installed.",
|
172
172
|
:hook => proc do |value|
|
173
173
|
if value
|
174
174
|
# This reconfigures the terminii for Node, Facts, and Catalog
|
@@ -522,7 +522,7 @@ module Puppet
|
|
522
522
|
authority requests. It's a separate server because it cannot
|
523
523
|
and does not need to horizontally scale."],
|
524
524
|
:ca_port => ["$masterport", "The port to use for the certificate authority."],
|
525
|
-
:preferred_serialization_format => ["
|
525
|
+
:preferred_serialization_format => ["pson", "The preferred means of serializing
|
526
526
|
ruby instances for passing over the wire. This won't guarantee that all
|
527
527
|
instances will be serialized using this method, since not all classes
|
528
528
|
can be guaranteed to support this format, but it will be used for all
|
@@ -423,9 +423,10 @@ class Nagios::Base
|
|
423
423
|
end
|
424
424
|
|
425
425
|
newtype :serviceescalation do
|
426
|
-
setparameters :host_name, :hostgroup_name, :
|
427
|
-
:
|
428
|
-
:
|
426
|
+
setparameters :host_name, :hostgroup_name, :servicegroup_name,
|
427
|
+
:service_description, :contacts, :contact_groups,
|
428
|
+
:first_notification, :last_notification, :notification_interval,
|
429
|
+
:escalation_period, :escalation_options,
|
429
430
|
:register, :use,
|
430
431
|
:_naginator_name
|
431
432
|
|