recommit for updates in build 49
This commit is contained in:
@@ -116,7 +116,30 @@
|
||||
18
|
||||
19
|
||||
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>
|
||||
<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',
|
||||
}
|
||||
}
|
||||
|
||||
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>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -105,9 +105,7 @@
|
||||
7
|
||||
8
|
||||
9
|
||||
10
|
||||
11
|
||||
12</pre>
|
||||
10</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre class="code"><span class="info file"># File 'manifests/main/files.pp', line 6</span>
|
||||
@@ -115,9 +113,7 @@
|
||||
class puppet_cd::main::files (
|
||||
|
||||
) inherits puppet_cd::params {
|
||||
|
||||
require puppet_cd::main::dirs
|
||||
|
||||
}</pre>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -251,6 +251,60 @@ considered a puppet agent.</p>
|
||||
—
|
||||
<div class='inline'>
|
||||
<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>
|
||||
|
||||
</li>
|
||||
@@ -266,9 +320,6 @@ considered a puppet agent.</p>
|
||||
<pre class="lines">
|
||||
|
||||
|
||||
15
|
||||
16
|
||||
17
|
||||
18
|
||||
19
|
||||
20
|
||||
@@ -288,10 +339,19 @@ considered a puppet agent.</p>
|
||||
34
|
||||
35
|
||||
36
|
||||
37</pre>
|
||||
37
|
||||
38
|
||||
39
|
||||
40
|
||||
41
|
||||
42
|
||||
43
|
||||
44
|
||||
45
|
||||
46</pre>
|
||||
</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 (
|
||||
|
||||
@@ -306,11 +366,17 @@ class puppet_cd::params (
|
||||
String $pt_server_pkg = 'puppetserver',
|
||||
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']
|
||||
|
||||
# service
|
||||
$pt_service = 'puppetserver'
|
||||
$pt_server_service = 'puppetserver'
|
||||
$pt_agent_service = 'puppet'
|
||||
$pt_db_service = 'puppetdb'
|
||||
|
||||
#
|
||||
# includes must be last
|
||||
|
||||
@@ -119,7 +119,25 @@
|
||||
21
|
||||
22
|
||||
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>
|
||||
<pre class="code"><span class="info file"># File 'manifests/server/service.pp', line 6</span>
|
||||
@@ -127,15 +145,33 @@
|
||||
class puppet_cd::server::service (
|
||||
|
||||
) inherits puppet_cd::params {
|
||||
if $fqdn == $pt_pm_fqdn {
|
||||
# manager requirement
|
||||
|
||||
require puppet_cd::firewall::iptables
|
||||
require puppet_cd::main::files
|
||||
|
||||
# manage puppet server service
|
||||
# manage agent service on all nodes
|
||||
service { $pt_agent_service:
|
||||
ensure => running,
|
||||
hasstatus => true,
|
||||
hasrestart => true,
|
||||
enable => true,
|
||||
}
|
||||
|
||||
service { $pt_service:
|
||||
# manage puppet server service
|
||||
if $fqdn == $pt_pm_fqdn {
|
||||
require puppet_cd::firewall::iptables
|
||||
|
||||
service { $pt_server_service:
|
||||
ensure => running,
|
||||
hasstatus => true,
|
||||
hasrestart => true,
|
||||
enable => true,
|
||||
}
|
||||
}
|
||||
|
||||
# manage puppetdb service
|
||||
if $fqdn == $pt_db_fqdn {
|
||||
require puppet_cd::firewall::iptables
|
||||
|
||||
service { $pt_db_service:
|
||||
ensure => running,
|
||||
hasstatus => true,
|
||||
hasrestart => true,
|
||||
|
||||
Reference in New Issue
Block a user