puppet 0.16.0 → 0.18.4
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 +98 -0
- data/Rakefile +5 -1
- data/bin/puppet +1 -1
- data/bin/puppetca +25 -11
- data/bin/puppetd +189 -66
- data/bin/puppetdoc +79 -62
- data/bin/puppetmasterd +93 -49
- data/bin/puppetrun +385 -0
- data/conf/redhat/client.init +5 -2
- data/conf/redhat/fileserver.conf +1 -1
- data/conf/redhat/lsb-config.patch +51 -0
- data/conf/redhat/puppet.spec +45 -18
- data/conf/redhat/puppetd.conf +32 -4
- data/conf/redhat/server.init +5 -2
- data/conf/solaris/pkginfo +7 -0
- data/conf/solaris/smf/puppetd.xml +77 -0
- data/conf/solaris/smf/puppetmasterd.xml +77 -0
- data/conf/solaris/smf/svc-puppetd +66 -0
- data/conf/solaris/smf/svc-puppetmasterd +62 -0
- data/examples/code/failers/noobjectrvalue +1 -0
- data/examples/code/snippets/deepclassheirarchy.pp +23 -0
- data/examples/code/snippets/defineoverrides.pp +17 -0
- data/examples/code/snippets/emptyexec.pp +3 -0
- data/examples/code/snippets/selectorvalues.pp +6 -1
- data/examples/code/snippets/tagged.pp +35 -0
- data/ext/ldap/puppet.schema +2 -2
- data/install.rb +4 -2
- data/lib/puppet.rb +206 -15
- data/lib/puppet/client.rb +30 -20
- data/lib/puppet/client/ca.rb +2 -2
- data/lib/puppet/client/dipper.rb +5 -9
- data/lib/puppet/client/master.rb +224 -44
- data/lib/puppet/client/pelement.rb +54 -9
- data/lib/puppet/client/proxy.rb +3 -2
- data/lib/puppet/client/reporter.rb +34 -0
- data/lib/puppet/client/runner.rb +17 -0
- data/lib/puppet/config.rb +136 -55
- data/lib/puppet/daemon.rb +59 -37
- data/lib/puppet/element.rb +2 -1
- data/lib/puppet/event.rb +14 -3
- data/lib/puppet/filetype.rb +28 -19
- data/lib/puppet/log.rb +297 -132
- data/lib/puppet/metric.rb +31 -131
- data/lib/puppet/networkclient.rb +73 -46
- data/lib/puppet/parameter.rb +49 -1
- data/lib/puppet/parsedfile.rb +32 -12
- data/lib/puppet/parser/ast.rb +6 -1
- data/lib/puppet/parser/ast/astarray.rb +32 -6
- data/lib/puppet/parser/ast/collection.rb +91 -0
- data/lib/puppet/parser/ast/compdef.rb +2 -2
- data/lib/puppet/parser/ast/component.rb +24 -11
- data/lib/puppet/parser/ast/function.rb +50 -0
- data/lib/puppet/parser/ast/hostclass.rb +70 -22
- data/lib/puppet/parser/ast/node.rb +17 -8
- data/lib/puppet/parser/ast/nodedef.rb +1 -1
- data/lib/puppet/parser/ast/objectdef.rb +28 -10
- data/lib/puppet/parser/ast/selector.rb +4 -1
- data/lib/puppet/parser/functions.rb +145 -0
- data/lib/puppet/parser/interpreter.rb +243 -86
- data/lib/puppet/parser/lexer.rb +5 -4
- data/lib/puppet/parser/parser.rb +586 -505
- data/lib/puppet/parser/scope.rb +337 -187
- data/lib/puppet/rails.rb +115 -0
- data/lib/puppet/rails/database.rb +40 -0
- data/lib/puppet/rails/host.rb +83 -0
- data/lib/puppet/rails/rails_object.rb +42 -0
- data/lib/puppet/rails/rails_parameter.rb +5 -0
- data/lib/puppet/reports/rrdgraph.rb +20 -0
- data/lib/puppet/reports/tagmail.rb +94 -0
- data/lib/puppet/server.rb +20 -4
- data/lib/puppet/server/authconfig.rb +14 -3
- data/lib/puppet/server/authstore.rb +2 -2
- data/lib/puppet/server/ca.rb +23 -11
- data/lib/puppet/server/filebucket.rb +10 -10
- data/lib/puppet/server/fileserver.rb +4 -8
- data/lib/puppet/server/master.rb +19 -22
- data/lib/puppet/server/pelement.rb +28 -16
- data/lib/puppet/server/report.rb +184 -0
- data/lib/puppet/server/runner.rb +62 -0
- data/lib/puppet/server/servlet.rb +23 -9
- data/lib/puppet/sslcertificates/ca.rb +25 -1
- data/lib/puppet/statechange.rb +34 -53
- data/lib/puppet/storage.rb +1 -2
- data/lib/puppet/transaction.rb +305 -133
- data/lib/puppet/transaction/report.rb +42 -0
- data/lib/puppet/transportable.rb +57 -33
- data/lib/puppet/type.rb +260 -127
- data/lib/puppet/type/component.rb +9 -21
- data/lib/puppet/type/cron.rb +367 -116
- data/lib/puppet/type/exec.rb +15 -16
- data/lib/puppet/type/group.rb +9 -1
- data/lib/puppet/type/nameservice.rb +2 -5
- data/lib/puppet/type/nameservice/netinfo.rb +3 -0
- data/lib/puppet/type/nameservice/objectadd.rb +23 -10
- data/lib/puppet/type/nameservice/pw.rb +16 -3
- data/lib/puppet/type/package.rb +25 -75
- data/lib/puppet/type/package/apple.rb +15 -1
- data/lib/puppet/type/package/apt.rb +37 -2
- data/lib/puppet/type/package/blastwave.rb +136 -0
- data/lib/puppet/type/package/dpkg.rb +4 -4
- data/lib/puppet/type/package/gem.rb +119 -0
- data/lib/puppet/type/package/openbsd.rb +7 -6
- data/lib/puppet/type/package/ports.rb +7 -2
- data/lib/puppet/type/package/rpm.rb +1 -1
- data/lib/puppet/type/package/sun.rb +23 -9
- data/lib/puppet/type/package/sunfreeware.rb +7 -0
- data/lib/puppet/type/package/yum.rb +16 -9
- data/lib/puppet/type/parsedtype.rb +7 -5
- data/lib/puppet/type/parsedtype/mount.rb +55 -34
- data/lib/puppet/type/parsedtype/port.rb +7 -1
- data/lib/puppet/type/parsedtype/sshkey.rb +6 -16
- data/lib/puppet/type/pfile.rb +115 -23
- data/lib/puppet/type/pfile/checksum.rb +18 -5
- data/lib/puppet/type/pfile/content.rb +2 -2
- data/lib/puppet/type/pfile/ensure.rb +3 -3
- data/lib/puppet/type/pfile/group.rb +2 -2
- data/lib/puppet/type/pfile/source.rb +28 -17
- data/lib/puppet/type/pfile/target.rb +25 -17
- data/lib/puppet/type/pfilebucket.rb +25 -6
- data/lib/puppet/type/schedule.rb +6 -6
- data/lib/puppet/type/service.rb +24 -14
- data/lib/puppet/type/service/debian.rb +1 -1
- data/lib/puppet/type/service/redhat.rb +13 -10
- data/lib/puppet/type/service/smf.rb +3 -3
- data/lib/puppet/type/state.rb +1 -2
- data/lib/puppet/type/symlink.rb +3 -4
- data/lib/puppet/type/user.rb +22 -10
- data/lib/puppet/type/yumrepo.rb +6 -1
- data/lib/puppet/type/zone.rb +595 -0
- data/lib/puppet/util.rb +58 -12
- data/test/client/client.rb +2 -2
- data/test/client/master.rb +92 -3
- data/test/client/pelement.rb +99 -0
- data/test/executables/puppetbin.rb +3 -4
- data/test/executables/puppetca.rb +3 -3
- data/test/executables/puppetd.rb +3 -3
- data/test/executables/puppetmasterd.rb +1 -5
- data/test/executables/puppetmodule.rb +2 -2
- data/test/language/ast.rb +200 -11
- data/test/language/functions.rb +245 -0
- data/test/language/interpreter.rb +155 -6
- data/test/language/lexer.rb +35 -2
- data/test/language/node.rb +48 -1
- data/test/language/parser.rb +250 -1
- data/test/language/rails.rb +105 -0
- data/test/language/scope.rb +304 -10
- data/test/language/snippets.rb +54 -5
- data/test/language/transportable.rb +60 -28
- data/test/other/config.rb +214 -1
- data/test/other/events.rb +67 -9
- data/test/other/log.rb +31 -5
- data/test/other/metrics.rb +23 -21
- data/test/other/parsedfile.rb +29 -2
- data/test/other/puppet.rb +79 -0
- data/test/other/report.rb +106 -0
- data/test/other/storage.rb +2 -2
- data/test/other/transactions.rb +128 -2
- data/test/puppet/utiltest.rb +10 -5
- data/test/puppettest.rb +193 -21
- data/test/server/authstore.rb +13 -4
- data/test/server/bucket.rb +33 -8
- data/test/server/ca.rb +44 -6
- data/test/server/master.rb +6 -7
- data/test/server/pelement.rb +15 -5
- data/test/server/report.rb +93 -0
- data/test/server/runner.rb +107 -0
- data/test/server/server.rb +28 -1
- data/test/types/cron.rb +339 -31
- data/test/types/file.rb +256 -24
- data/test/types/filebucket.rb +6 -2
- data/test/types/filesources.rb +41 -92
- data/test/types/group.rb +31 -1
- data/test/types/host.rb +2 -1
- data/test/types/mount.rb +18 -1
- data/test/types/package.rb +200 -18
- data/test/types/service.rb +5 -1
- data/test/types/sshkey.rb +2 -1
- data/test/types/symlink.rb +3 -2
- data/test/types/type.rb +180 -1
- data/test/types/user.rb +65 -27
- data/test/types/yumrepo.rb +15 -0
- data/test/types/zone.rb +437 -0
- metadata +43 -4
- data/bin/cf2puppet +0 -186
- data/conf/redhat/puppetmasterd.conf +0 -5
data/conf/redhat/puppet.spec
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
%define
|
2
|
-
%define
|
1
|
+
%{!?ruby_sitelibdir: %define ruby_sitelibdir %(ruby -rrbconfig -e 'puts Config::CONFIG["sitelibdir"]')}
|
2
|
+
%define pbuild %{_builddir}/%{name}-%{version}
|
3
3
|
%define confdir conf/redhat
|
4
4
|
|
5
5
|
Summary: A network tool for managing many disparate systems
|
6
6
|
Name: puppet
|
7
|
-
Version: 0.
|
7
|
+
Version: 0.18.4
|
8
8
|
Release: 1%{?dist}
|
9
9
|
License: GPL
|
10
10
|
Group: System Environment/Base
|
@@ -13,11 +13,10 @@ URL: http://reductivelabs.com/projects/puppet/
|
|
13
13
|
Source: http://reductivelabs.com/downloads/puppet/%{name}-%{version}.tgz
|
14
14
|
|
15
15
|
Requires: ruby >= 1.8.1
|
16
|
-
Requires:
|
16
|
+
Requires: ruby(abi) = 1.8
|
17
|
+
Requires: facter >= 1.1.4
|
17
18
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
18
|
-
|
19
|
-
# See bz184199
|
20
|
-
#BuildArchitectures: noarch
|
19
|
+
BuildArchitectures: noarch
|
21
20
|
BuildRequires: ruby >= 1.8.1
|
22
21
|
|
23
22
|
%description
|
@@ -42,32 +41,33 @@ The server can also function as a certificate authority and file server.
|
|
42
41
|
%{__rm} -rf %{buildroot}
|
43
42
|
%{__install} -d -m0755 %{buildroot}%{_sbindir}
|
44
43
|
%{__install} -d -m0755 %{buildroot}%{_bindir}
|
45
|
-
%{__install} -d -m0755 %{buildroot}%{
|
44
|
+
%{__install} -d -m0755 %{buildroot}%{ruby_sitelibdir}
|
46
45
|
%{__install} -d -m0755 %{buildroot}%{_sysconfdir}/puppet/manifests
|
47
46
|
%{__install} -d -m0755 %{buildroot}%{_docdir}/%{name}-%{version}
|
48
|
-
%{__install} -d -m0755 %{buildroot}%{_localstatedir}/puppet
|
47
|
+
%{__install} -d -m0755 %{buildroot}%{_localstatedir}/lib/puppet
|
49
48
|
%{__install} -d -m0755 %{buildroot}%{_localstatedir}/run/puppet
|
50
49
|
%{__install} -d -m0755 %{buildroot}%{_localstatedir}/log/puppet
|
51
|
-
%{__install} -Dp -m0755 %{
|
50
|
+
%{__install} -Dp -m0755 %{pbuild}/bin/* %{buildroot}%{_sbindir}
|
52
51
|
%{__mv} %{buildroot}%{_sbindir}/puppet %{buildroot}%{_bindir}/puppet
|
53
|
-
%{
|
54
|
-
%{
|
55
|
-
|
52
|
+
%{__mv} %{buildroot}%{_sbindir}/puppetrun %{buildroot}%{_bindir}/puppetrun
|
53
|
+
%{__install} -Dp -m0644 %{pbuild}/lib/puppet.rb %{buildroot}%{ruby_sitelibdir}/puppet.rb
|
54
|
+
%{__cp} -a %{pbuild}/lib/puppet %{buildroot}%{ruby_sitelibdir}
|
55
|
+
find %{buildroot}%{ruby_sitelibdir} -type f -perm +ugo+x -print0 | xargs -0 -r %{__chmod} a-x
|
56
56
|
%{__install} -Dp -m0644 %{confdir}/client.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/puppet
|
57
57
|
%{__install} -Dp -m0755 %{confdir}/client.init %{buildroot}%{_initrddir}/puppet
|
58
58
|
%{__install} -Dp -m0644 %{confdir}/server.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/puppetmaster
|
59
59
|
%{__install} -Dp -m0755 %{confdir}/server.init %{buildroot}%{_initrddir}/puppetmaster
|
60
60
|
%{__install} -Dp -m0644 %{confdir}/fileserver.conf %{buildroot}%{_sysconfdir}/puppet/fileserver.conf
|
61
61
|
%{__install} -Dp -m0644 %{confdir}/puppetd.conf %{buildroot}%{_sysconfdir}/puppet/puppetd.conf
|
62
|
-
%{
|
62
|
+
%{__ln_s} puppetd.conf %{buildroot}%{_sysconfdir}/puppet/puppetmasterd.conf
|
63
|
+
%{__ln_s} puppetd.conf %{buildroot}%{_sysconfdir}/puppet/puppetca.conf
|
63
64
|
%{__install} -Dp -m0644 %{confdir}/logrotate %{buildroot}%{_sysconfdir}/logrotate.d/puppet
|
64
65
|
|
65
66
|
%files
|
66
67
|
%defattr(-, root, root, 0755)
|
67
68
|
%{_bindir}/puppet
|
68
69
|
%{_sbindir}/puppetd
|
69
|
-
%{
|
70
|
-
%{_localstatedir}/puppet
|
70
|
+
%{ruby_sitelibdir}/*
|
71
71
|
%{_initrddir}/puppet
|
72
72
|
%config(noreplace) %{_sysconfdir}/sysconfig/puppet
|
73
73
|
%config(noreplace) %{_sysconfdir}/puppet/puppetd.conf
|
@@ -78,13 +78,15 @@ find %{buildroot}%{rubylibdir} -type f -perm +ugo+x -print0 | xargs -0 -r %{__ch
|
|
78
78
|
# write to them
|
79
79
|
%attr(-, puppet, puppet) %{_localstatedir}/run/puppet
|
80
80
|
%attr(-, puppet, puppet) %{_localstatedir}/log/puppet
|
81
|
+
%attr(-, puppet, puppet) %{_localstatedir}/lib/puppet
|
81
82
|
|
82
83
|
%files server
|
84
|
+
%defattr(-, root, root, 0755)
|
83
85
|
%{_sbindir}/puppetmasterd
|
86
|
+
%{_bindir}/puppetrun
|
84
87
|
%{_initrddir}/puppetmaster
|
85
88
|
%config(noreplace) %{_sysconfdir}/puppet/*
|
86
89
|
%config(noreplace) %{_sysconfdir}/sysconfig/puppetmaster
|
87
|
-
%{_sbindir}/cf2puppet
|
88
90
|
%{_sbindir}/puppetca
|
89
91
|
|
90
92
|
%pre
|
@@ -120,6 +122,30 @@ fi
|
|
120
122
|
%{__rm} -rf %{buildroot}
|
121
123
|
|
122
124
|
%changelog
|
125
|
+
* Wed Jul 5 2006 David Lutterkort <dlutter@redhat.com> - 0.18.2-1
|
126
|
+
- New version
|
127
|
+
|
128
|
+
* Wed Jun 28 2006 David Lutterkort <dlutter@redhat.com> - 0.18.1-1
|
129
|
+
- Removed lsb-config.patch and yumrepo.patch since they are upstream now
|
130
|
+
|
131
|
+
* Mon Jun 19 2006 David Lutterkort <dlutter@redhat.com> - 0.18.0-1
|
132
|
+
- Patch config for LSB compliance (lsb-config.patch)
|
133
|
+
- Changed config moves /var/puppet to /var/lib/puppet, /etc/puppet/ssl
|
134
|
+
to /var/lib/puppet, /etc/puppet/clases.txt to /var/lib/puppet/classes.txt,
|
135
|
+
/etc/puppet/localconfig.yaml to /var/lib/puppet/localconfig.yaml
|
136
|
+
|
137
|
+
* Fri May 19 2006 David Lutterkort <dlutter@redhat.com> - 0.17.2-1
|
138
|
+
- Added /usr/bin/puppetrun to server subpackage
|
139
|
+
- Backported patch for yumrepo type (yumrepo.patch)
|
140
|
+
|
141
|
+
* Wed May 3 2006 David Lutterkort <dlutter@redhat.com> - 0.16.4-1
|
142
|
+
- Rebuilt
|
143
|
+
|
144
|
+
* Fri Apr 21 2006 David Lutterkort <dlutter@redhat.com> - 0.16.0-1
|
145
|
+
- Fix default file permissions in server subpackage
|
146
|
+
- Run puppetmaster as user puppet
|
147
|
+
- rebuilt for 0.16.0
|
148
|
+
|
123
149
|
* Mon Apr 17 2006 David Lutterkort <dlutter@redhat.com> - 0.15.3-2
|
124
150
|
- Don't create empty log files in post-install scriptlet
|
125
151
|
|
@@ -127,7 +153,8 @@ fi
|
|
127
153
|
- Rebuilt for new version
|
128
154
|
|
129
155
|
* Wed Mar 22 2006 David Lutterkort <dlutter@redhat.com> - 0.15.1-1
|
130
|
-
- Patch0: Run puppetmaster as root; running as puppet is not ready
|
156
|
+
- Patch0: Run puppetmaster as root; running as puppet is not ready
|
157
|
+
for primetime
|
131
158
|
|
132
159
|
* Mon Mar 13 2006 David Lutterkort <dlutter@redhat.com> - 0.15.0-1
|
133
160
|
- Commented out noarch; requires fix for bz184199
|
data/conf/redhat/puppetd.conf
CHANGED
@@ -1,5 +1,33 @@
|
|
1
|
+
[puppet]
|
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 lock files are kept.
|
15
|
+
# The default value is '$vardir/locks'.
|
16
|
+
lockdir = /var/lock
|
17
|
+
|
18
|
+
# Where SSL certificates are kept.
|
19
|
+
# The default value is '$confdir/ssl'.
|
20
|
+
ssldir = $vardir/ssl
|
21
|
+
|
1
22
|
[puppetd]
|
2
|
-
#
|
3
|
-
#
|
4
|
-
|
5
|
-
|
23
|
+
# The file in which puppetd stores a list of the classes
|
24
|
+
# associated with the retrieved configuratiion. Can be loaded in
|
25
|
+
# the separate ``puppet`` executable using the ``--loadclasses``
|
26
|
+
# option.
|
27
|
+
# The default value is '$confdir/classes.txt'.
|
28
|
+
classfile = $vardir/classes.txt
|
29
|
+
|
30
|
+
# Where puppetd caches the local configuration. An
|
31
|
+
# extension indicating the cache format is added automatically.
|
32
|
+
# The default value is '$confdir/localconfig'.
|
33
|
+
localconfig = $vardir/localconfig
|
data/conf/redhat/server.init
CHANGED
@@ -0,0 +1,77 @@
|
|
1
|
+
<?xml version="1.0"?>
|
2
|
+
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
|
3
|
+
|
4
|
+
<!-- Puppetd Manifest: Luke Kanies - reductivelabs.com -->
|
5
|
+
|
6
|
+
<service_bundle type='manifest' name='puppetd'>
|
7
|
+
|
8
|
+
|
9
|
+
<service
|
10
|
+
name='network/puppetd'
|
11
|
+
type='service'
|
12
|
+
version='1'>
|
13
|
+
|
14
|
+
<create_default_instance enabled='true'/>
|
15
|
+
<single_instance/>
|
16
|
+
|
17
|
+
<dependency name='config-file'
|
18
|
+
grouping='require_all'
|
19
|
+
restart_on='none'
|
20
|
+
type='path'>
|
21
|
+
<service_fmri value='file:///etc/puppet/puppetd.conf'/>
|
22
|
+
</dependency>
|
23
|
+
|
24
|
+
<dependency name='loopback'
|
25
|
+
grouping='require_all'
|
26
|
+
restart_on='error'
|
27
|
+
type='service'>
|
28
|
+
<service_fmri value='svc:/network/loopback:default'/>
|
29
|
+
</dependency>
|
30
|
+
|
31
|
+
<dependency name='physical'
|
32
|
+
grouping='require_all'
|
33
|
+
restart_on='error'
|
34
|
+
type='service'>
|
35
|
+
<service_fmri value='svc:/network/physical:default'/>
|
36
|
+
</dependency>
|
37
|
+
|
38
|
+
<dependency name='fs-local'
|
39
|
+
grouping='require_all'
|
40
|
+
restart_on='none'
|
41
|
+
type='service'>
|
42
|
+
<service_fmri value='svc:/system/filesystem/local'/>
|
43
|
+
</dependency>
|
44
|
+
|
45
|
+
<exec_method
|
46
|
+
type='method'
|
47
|
+
name='start'
|
48
|
+
exec='/opt/csw/lib/svc/method/svc-puppetd start'
|
49
|
+
timeout_seconds='60' />
|
50
|
+
|
51
|
+
<exec_method
|
52
|
+
type='method'
|
53
|
+
name='stop'
|
54
|
+
exec='/opt/csw/lib/svc/method/svc-puppetd stop'
|
55
|
+
timeout_seconds='60' />
|
56
|
+
|
57
|
+
<exec_method
|
58
|
+
type='method'
|
59
|
+
name='refresh'
|
60
|
+
exec='/opt/csw/lib/svc/method/svc-puppetd reload'
|
61
|
+
timeout_seconds='60' />
|
62
|
+
|
63
|
+
<stability value='Unstable' />
|
64
|
+
|
65
|
+
<template>
|
66
|
+
<common_name>
|
67
|
+
<loctext xml:lang='C'>Puppet Client Daemon</loctext>
|
68
|
+
</common_name>
|
69
|
+
<documentation>
|
70
|
+
<manpage title='puppetd' section='1' />
|
71
|
+
<doc_link name='reductivelabs.com'
|
72
|
+
uri='http://www.reductivelabs.com/projects/puppet' />
|
73
|
+
</documentation>
|
74
|
+
</template>
|
75
|
+
</service>
|
76
|
+
|
77
|
+
</service_bundle>
|
@@ -0,0 +1,77 @@
|
|
1
|
+
<?xml version="1.0"?>
|
2
|
+
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
|
3
|
+
|
4
|
+
<!-- PuppetMasterd Manifest: Luke Kanies - reductivelabs.com -->
|
5
|
+
|
6
|
+
<service_bundle type='manifest' name='puppetmasterd'>
|
7
|
+
|
8
|
+
|
9
|
+
<service
|
10
|
+
name='network/puppetmasterd'
|
11
|
+
type='service'
|
12
|
+
version='1'>
|
13
|
+
|
14
|
+
<create_default_instance enabled='true'/>
|
15
|
+
<single_instance/>
|
16
|
+
|
17
|
+
<dependency name='config-file'
|
18
|
+
grouping='require_all'
|
19
|
+
restart_on='none'
|
20
|
+
type='path'>
|
21
|
+
<service_fmri value='file:///etc/puppet/puppetmasterd.conf'/>
|
22
|
+
</dependency>
|
23
|
+
|
24
|
+
<dependency name='loopback'
|
25
|
+
grouping='require_all'
|
26
|
+
restart_on='error'
|
27
|
+
type='service'>
|
28
|
+
<service_fmri value='svc:/network/loopback:default'/>
|
29
|
+
</dependency>
|
30
|
+
|
31
|
+
<dependency name='physical'
|
32
|
+
grouping='require_all'
|
33
|
+
restart_on='error'
|
34
|
+
type='service'>
|
35
|
+
<service_fmri value='svc:/network/physical:default'/>
|
36
|
+
</dependency>
|
37
|
+
|
38
|
+
<dependency name='fs-local'
|
39
|
+
grouping='require_all'
|
40
|
+
restart_on='none'
|
41
|
+
type='service'>
|
42
|
+
<service_fmri value='svc:/system/filesystem/local'/>
|
43
|
+
</dependency>
|
44
|
+
|
45
|
+
<exec_method
|
46
|
+
type='method'
|
47
|
+
name='start'
|
48
|
+
exec='/opt/csw/lib/svc/method/svc-puppetmasterd start'
|
49
|
+
timeout_seconds='60' />
|
50
|
+
|
51
|
+
<exec_method
|
52
|
+
type='method'
|
53
|
+
name='stop'
|
54
|
+
exec='/opt/csw/lib/svc/method/svc-puppetmasterd stop'
|
55
|
+
timeout_seconds='60' />
|
56
|
+
|
57
|
+
<exec_method
|
58
|
+
type='method'
|
59
|
+
name='refresh'
|
60
|
+
exec='/opt/csw/lib/svc/method/svc-puppetmasterd reload'
|
61
|
+
timeout_seconds='60' />
|
62
|
+
|
63
|
+
<stability value='Unstable' />
|
64
|
+
|
65
|
+
<template>
|
66
|
+
<common_name>
|
67
|
+
<loctext xml:lang='C'>Puppet Server Daemon</loctext>
|
68
|
+
</common_name>
|
69
|
+
<documentation>
|
70
|
+
<manpage title='puppetmasterd' section='1' />
|
71
|
+
<doc_link name='reductivelabs.com'
|
72
|
+
uri='http://www.reductivelabs.com/projects/puppet' />
|
73
|
+
</documentation>
|
74
|
+
</template>
|
75
|
+
</service>
|
76
|
+
|
77
|
+
</service_bundle>
|
@@ -0,0 +1,66 @@
|
|
1
|
+
#!/bin/sh
|
2
|
+
# This is the /etc/init.d file for puppetd
|
3
|
+
# Modified for CSW
|
4
|
+
#
|
5
|
+
# description: puppetd - Puppet Automation Client
|
6
|
+
#
|
7
|
+
|
8
|
+
. /lib/svc/share/smf_include.sh
|
9
|
+
|
10
|
+
prefix=/opt/csw
|
11
|
+
exec_prefix=/opt/csw
|
12
|
+
sysconfdir=/opt/csw/etc
|
13
|
+
sbindir=/opt/csw/sbin
|
14
|
+
|
15
|
+
pidfile=/var/puppet/run/puppetd.pid
|
16
|
+
|
17
|
+
case "$1" in
|
18
|
+
start)
|
19
|
+
cd /
|
20
|
+
# Start daemons.
|
21
|
+
|
22
|
+
printf "Starting Puppet client services:"
|
23
|
+
|
24
|
+
/opt/csw/bin/puppetd
|
25
|
+
|
26
|
+
printf " puppetd"
|
27
|
+
echo ""
|
28
|
+
;;
|
29
|
+
stop)
|
30
|
+
printf "Stopping Puppet client services:"
|
31
|
+
kill `cat $pidfile`
|
32
|
+
|
33
|
+
printf " puppetd"
|
34
|
+
echo ""
|
35
|
+
;;
|
36
|
+
restart)
|
37
|
+
printf "Restarting Puppet client services:"
|
38
|
+
kill -HUP `cat $pidfile`
|
39
|
+
|
40
|
+
printf " puppetd"
|
41
|
+
echo ""
|
42
|
+
;;
|
43
|
+
reload)
|
44
|
+
printf "Reloading Puppet client services:"
|
45
|
+
|
46
|
+
kill -HUP `cat $pidfile`
|
47
|
+
|
48
|
+
printf " puppetd"
|
49
|
+
echo ""
|
50
|
+
;;
|
51
|
+
status)
|
52
|
+
if [ -f $pidfile ]; then
|
53
|
+
pid=`cat $pidfile`
|
54
|
+
curpid=`pgrep puppetd`
|
55
|
+
if [ "$pid" -eq "$curpid" ]; then
|
56
|
+
exit 0
|
57
|
+
else
|
58
|
+
exit 1
|
59
|
+
fi
|
60
|
+
else
|
61
|
+
exit 1
|
62
|
+
fi
|
63
|
+
esac
|
64
|
+
exit 0
|
65
|
+
|
66
|
+
# $Id: svc-puppetd 1403 2006-07-18 23:34:29Z luke $
|
@@ -0,0 +1,62 @@
|
|
1
|
+
#!/bin/sh
|
2
|
+
#
|
3
|
+
|
4
|
+
. /lib/svc/share/smf_include.sh
|
5
|
+
|
6
|
+
prefix=/opt/csw
|
7
|
+
exec_prefix=/opt/csw
|
8
|
+
sysconfdir=/opt/csw/etc
|
9
|
+
sbindir=/opt/csw/sbin
|
10
|
+
|
11
|
+
pidfile=/var/puppet/run/puppetmasterd.pid
|
12
|
+
|
13
|
+
case "$1" in
|
14
|
+
start)
|
15
|
+
cd /
|
16
|
+
# Start daemons.
|
17
|
+
|
18
|
+
printf "Starting Puppet server services:"
|
19
|
+
|
20
|
+
/opt/csw/bin/puppetmasterd
|
21
|
+
|
22
|
+
printf " puppetmaster"
|
23
|
+
echo ""
|
24
|
+
;;
|
25
|
+
stop)
|
26
|
+
printf "Stopping Puppet server services:"
|
27
|
+
kill `cat $pidfile`
|
28
|
+
|
29
|
+
printf " puppetmasterd"
|
30
|
+
echo ""
|
31
|
+
;;
|
32
|
+
restart)
|
33
|
+
printf "Restarting Puppet server services:"
|
34
|
+
kill -HUP `cat $pidfile`
|
35
|
+
|
36
|
+
printf " puppetmasterd"
|
37
|
+
echo ""
|
38
|
+
;;
|
39
|
+
reload)
|
40
|
+
printf "Reloading Puppet server services:"
|
41
|
+
|
42
|
+
kill -HUP `cat $pidfile`
|
43
|
+
|
44
|
+
printf " puppetmasterd"
|
45
|
+
echo ""
|
46
|
+
;;
|
47
|
+
status)
|
48
|
+
if [ -f $pidfile ]; then
|
49
|
+
pid=`cat $pidfile`
|
50
|
+
curpid=`pgrep puppetmasterd`
|
51
|
+
if [ "$pid" -eq "$curpid" ]; then
|
52
|
+
exit 0
|
53
|
+
else
|
54
|
+
exit 1
|
55
|
+
fi
|
56
|
+
else
|
57
|
+
exit 1
|
58
|
+
fi
|
59
|
+
esac
|
60
|
+
exit 0
|
61
|
+
|
62
|
+
# $Id: svc-puppetmasterd 1403 2006-07-18 23:34:29Z luke $
|