recommit for updates in build 49
This commit is contained in:
@@ -116,7 +116,30 @@
|
|||||||
18
|
18
|
||||||
19
|
19
|
||||||
20
|
20
|
||||||
21</pre>
|
21
|
||||||
|
22
|
||||||
|
23
|
||||||
|
24
|
||||||
|
25
|
||||||
|
26
|
||||||
|
27
|
||||||
|
28
|
||||||
|
29
|
||||||
|
30
|
||||||
|
31
|
||||||
|
32
|
||||||
|
33
|
||||||
|
34
|
||||||
|
35
|
||||||
|
36
|
||||||
|
37
|
||||||
|
38
|
||||||
|
39
|
||||||
|
40
|
||||||
|
41
|
||||||
|
42
|
||||||
|
43
|
||||||
|
44</pre>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<pre class="code"><span class="info file"># File 'manifests/firewall/iptables.pp', line 6</span>
|
<pre class="code"><span class="info file"># File 'manifests/firewall/iptables.pp', line 6</span>
|
||||||
@@ -136,6 +159,29 @@ class puppet_cd::firewall::iptables (
|
|||||||
jump => 'accept',
|
jump => 'accept',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if $fqdn == $pt_db_fqdn {
|
||||||
|
if $pt_use_ssl_only != true {
|
||||||
|
firewall { "3${pt_no_ssl_port} open port ${pt_no_ssl_port}":
|
||||||
|
proto => 'tcp',
|
||||||
|
dport => $pt_no_ssl_port,
|
||||||
|
jump => 'accept',
|
||||||
|
}
|
||||||
|
firewall { "3${pt_ssl_port} open port ${pt_ssl_port}":
|
||||||
|
proto => 'tcp',
|
||||||
|
dport => $pt_ssl_port,
|
||||||
|
jump => 'accept',
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if $pt_use_ssl_only == true {
|
||||||
|
firewall { "3${pt_ssl_port} open port ${pt_ssl_port}":
|
||||||
|
proto => 'tcp',
|
||||||
|
dport => $pt_ssl_port,
|
||||||
|
jump => 'accept',
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}</pre>
|
}</pre>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -105,19 +105,15 @@
|
|||||||
7
|
7
|
||||||
8
|
8
|
||||||
9
|
9
|
||||||
10
|
10</pre>
|
||||||
11
|
|
||||||
12</pre>
|
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<pre class="code"><span class="info file"># File 'manifests/main/files.pp', line 6</span>
|
<pre class="code"><span class="info file"># File 'manifests/main/files.pp', line 6</span>
|
||||||
|
|
||||||
class puppet_cd::main::files (
|
class puppet_cd::main::files (
|
||||||
|
|
||||||
) inherits puppet_cd::params {
|
) inherits puppet_cd::params {
|
||||||
|
|
||||||
require puppet_cd::main::dirs
|
require puppet_cd::main::dirs
|
||||||
|
|
||||||
}</pre>
|
}</pre>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -251,6 +251,60 @@ considered a puppet agent.</p>
|
|||||||
—
|
—
|
||||||
<div class='inline'>
|
<div class='inline'>
|
||||||
<p>the packages for puppetdb</p>
|
<p>the packages for puppetdb</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
|
||||||
|
<span class='name'>pt_no_ssl_port</span>
|
||||||
|
|
||||||
|
|
||||||
|
<span class='type'>(<tt>String</tt>)</span>
|
||||||
|
|
||||||
|
|
||||||
|
<em class="default">(defaults to: <tt>'8080'</tt>)</em>
|
||||||
|
|
||||||
|
|
||||||
|
—
|
||||||
|
<div class='inline'>
|
||||||
|
<p>non-ssl port number for puppetdb</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
|
||||||
|
<span class='name'>pt_ssl_port</span>
|
||||||
|
|
||||||
|
|
||||||
|
<span class='type'>(<tt>String</tt>)</span>
|
||||||
|
|
||||||
|
|
||||||
|
<em class="default">(defaults to: <tt>'8081'</tt>)</em>
|
||||||
|
|
||||||
|
|
||||||
|
—
|
||||||
|
<div class='inline'>
|
||||||
|
<p>ssl port for puppetdb</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
|
||||||
|
<span class='name'>pt_use_ssl_only</span>
|
||||||
|
|
||||||
|
|
||||||
|
<span class='type'>(<tt>Boolean</tt>)</span>
|
||||||
|
|
||||||
|
|
||||||
|
<em class="default">(defaults to: <tt>true</tt>)</em>
|
||||||
|
|
||||||
|
|
||||||
|
—
|
||||||
|
<div class='inline'>
|
||||||
|
<p>whether to use ssl only.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
@@ -266,9 +320,6 @@ considered a puppet agent.</p>
|
|||||||
<pre class="lines">
|
<pre class="lines">
|
||||||
|
|
||||||
|
|
||||||
15
|
|
||||||
16
|
|
||||||
17
|
|
||||||
18
|
18
|
||||||
19
|
19
|
||||||
20
|
20
|
||||||
@@ -288,10 +339,19 @@ considered a puppet agent.</p>
|
|||||||
34
|
34
|
||||||
35
|
35
|
||||||
36
|
36
|
||||||
37</pre>
|
37
|
||||||
|
38
|
||||||
|
39
|
||||||
|
40
|
||||||
|
41
|
||||||
|
42
|
||||||
|
43
|
||||||
|
44
|
||||||
|
45
|
||||||
|
46</pre>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<pre class="code"><span class="info file"># File 'manifests/params.pp', line 15</span>
|
<pre class="code"><span class="info file"># File 'manifests/params.pp', line 18</span>
|
||||||
|
|
||||||
class puppet_cd::params (
|
class puppet_cd::params (
|
||||||
|
|
||||||
@@ -306,11 +366,17 @@ class puppet_cd::params (
|
|||||||
String $pt_server_pkg = 'puppetserver',
|
String $pt_server_pkg = 'puppetserver',
|
||||||
Array $pt_db_pkg = ['puppetdb','puppetdb-termini'],
|
Array $pt_db_pkg = ['puppetdb','puppetdb-termini'],
|
||||||
|
|
||||||
|
String $pt_no_ssl_port = '8080',
|
||||||
|
String $pt_ssl_port = '8081',
|
||||||
|
Boolean $pt_use_ssl_only = true,
|
||||||
|
|
||||||
) {
|
) {
|
||||||
$fqdn = $facts['networking']['fqdn']
|
$fqdn = $facts['networking']['fqdn']
|
||||||
|
|
||||||
# service
|
# service
|
||||||
$pt_service = 'puppetserver'
|
$pt_server_service = 'puppetserver'
|
||||||
|
$pt_agent_service = 'puppet'
|
||||||
|
$pt_db_service = 'puppetdb'
|
||||||
|
|
||||||
#
|
#
|
||||||
# includes must be last
|
# includes must be last
|
||||||
|
|||||||
@@ -119,7 +119,25 @@
|
|||||||
21
|
21
|
||||||
22
|
22
|
||||||
23
|
23
|
||||||
24</pre>
|
24
|
||||||
|
25
|
||||||
|
26
|
||||||
|
27
|
||||||
|
28
|
||||||
|
29
|
||||||
|
30
|
||||||
|
31
|
||||||
|
32
|
||||||
|
33
|
||||||
|
34
|
||||||
|
35
|
||||||
|
36
|
||||||
|
37
|
||||||
|
38
|
||||||
|
39
|
||||||
|
40
|
||||||
|
41
|
||||||
|
42</pre>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<pre class="code"><span class="info file"># File 'manifests/server/service.pp', line 6</span>
|
<pre class="code"><span class="info file"># File 'manifests/server/service.pp', line 6</span>
|
||||||
@@ -127,15 +145,33 @@
|
|||||||
class puppet_cd::server::service (
|
class puppet_cd::server::service (
|
||||||
|
|
||||||
) inherits puppet_cd::params {
|
) inherits puppet_cd::params {
|
||||||
|
require puppet_cd::main::files
|
||||||
|
|
||||||
|
# manage agent service on all nodes
|
||||||
|
service { $pt_agent_service:
|
||||||
|
ensure => running,
|
||||||
|
hasstatus => true,
|
||||||
|
hasrestart => true,
|
||||||
|
enable => true,
|
||||||
|
}
|
||||||
|
|
||||||
|
# manage puppet server service
|
||||||
if $fqdn == $pt_pm_fqdn {
|
if $fqdn == $pt_pm_fqdn {
|
||||||
# manager requirement
|
|
||||||
|
|
||||||
require puppet_cd::firewall::iptables
|
require puppet_cd::firewall::iptables
|
||||||
require puppet_cd::main::files
|
|
||||||
|
|
||||||
# manage puppet server service
|
service { $pt_server_service:
|
||||||
|
ensure => running,
|
||||||
|
hasstatus => true,
|
||||||
|
hasrestart => true,
|
||||||
|
enable => true,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
service { $pt_service:
|
# manage puppetdb service
|
||||||
|
if $fqdn == $pt_db_fqdn {
|
||||||
|
require puppet_cd::firewall::iptables
|
||||||
|
|
||||||
|
service { $pt_db_service:
|
||||||
ensure => running,
|
ensure => running,
|
||||||
hasstatus => true,
|
hasstatus => true,
|
||||||
hasrestart => true,
|
hasrestart => true,
|
||||||
|
|||||||
Reference in New Issue
Block a user