recommit for updates in build 4
This commit is contained in:
@@ -136,19 +136,7 @@ href="http://www.gnu.org/licenses">www.gnu.org/licenses</a>/.</p>
|
||||
40
|
||||
41
|
||||
42
|
||||
43
|
||||
44
|
||||
45
|
||||
46
|
||||
47
|
||||
48
|
||||
49
|
||||
50
|
||||
51
|
||||
52
|
||||
53
|
||||
54
|
||||
55</pre>
|
||||
43</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre class="code"><span class="info file"># File 'manifests/firewall/iptables.pp', line 23</span>
|
||||
@@ -161,30 +149,18 @@ class cd_haproxy::firewall::iptables (
|
||||
|
||||
require cd_haproxy::main::files
|
||||
|
||||
if $hy_proxy_mode == 'http' {
|
||||
|
||||
firewall { "${hy_fw_order_no}80 tcp port 80":
|
||||
proto => 'tcp',
|
||||
dport => '80',
|
||||
action => 'accept',
|
||||
}
|
||||
firewall { "${hy_fw_order_no}${hy_http_port} tcp port ${hy_http_port}":
|
||||
proto => 'tcp',
|
||||
dport => $hy_http_port,
|
||||
action => 'accept',
|
||||
}
|
||||
|
||||
if $hy_proxy_mode == 'tcp' {
|
||||
|
||||
firewall { "${hy_fw_order_no}${hy_fe_port} tcp port ${hy_fe_port}":
|
||||
proto => 'tcp',
|
||||
dport => $hy_fe_port,
|
||||
action => 'accept',
|
||||
}
|
||||
firewall { "${hy_fw_order_no}${hy_https_port} tcp port ${hy_https_port}":
|
||||
proto => 'tcp',
|
||||
dport => $hy_https_port,
|
||||
action => 'accept',
|
||||
}
|
||||
}
|
||||
|
||||
if $fqdn == $hy_host_fqdn {
|
||||
|
||||
require cd_haproxy::main::files
|
||||
|
||||
}
|
||||
}</pre>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -132,7 +132,7 @@ class cd_haproxy::main::config (
|
||||
|
||||
) inherits cd_haproxy::params {
|
||||
|
||||
require cd_haproxy::server::service
|
||||
include cd_haproxy::server::service
|
||||
|
||||
}</pre>
|
||||
</td>
|
||||
|
||||
@@ -125,9 +125,7 @@ href="http://www.gnu.org/licenses">www.gnu.org/licenses</a>/.</p>
|
||||
29
|
||||
30
|
||||
31
|
||||
32
|
||||
33
|
||||
34</pre>
|
||||
32</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre class="code"><span class="info file"># File 'manifests/main/dirs.pp', line 23</span>
|
||||
@@ -137,9 +135,7 @@ class cd_haproxy::main::dirs (
|
||||
) inherits cd_haproxy::params {
|
||||
|
||||
if $fqdn == $hy_host_fqdn {
|
||||
|
||||
require cd_haproxy::main::install
|
||||
|
||||
require cd_haproxy::main::user
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -123,9 +123,7 @@ href="http://www.gnu.org/licenses">www.gnu.org/licenses</a>/.</p>
|
||||
27
|
||||
28
|
||||
29
|
||||
30
|
||||
31
|
||||
32</pre>
|
||||
30</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre class="code"><span class="info file"># File 'manifests/main/files.pp', line 23</span>
|
||||
@@ -135,9 +133,7 @@ class cd_haproxy::main::files (
|
||||
) inherits cd_haproxy::params {
|
||||
|
||||
if $fqdn == $hy_host_fqdn {
|
||||
|
||||
require cd_haproxy::main::dirs
|
||||
|
||||
}
|
||||
}</pre>
|
||||
</td>
|
||||
|
||||
@@ -124,7 +124,9 @@ href="http://www.gnu.org/licenses">www.gnu.org/licenses</a>/.</p>
|
||||
28
|
||||
29
|
||||
30
|
||||
31</pre>
|
||||
31
|
||||
32
|
||||
33</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre class="code"><span class="info file"># File 'manifests/main/install.pp', line 24</span>
|
||||
@@ -133,8 +135,10 @@ class cd_haproxy::main::install (
|
||||
|
||||
) inherits cd_haproxy::params {
|
||||
|
||||
package {$reqpackages:
|
||||
ensure => $pkg_ensure,
|
||||
if $fqdn == $hy_host_fqdn {
|
||||
package {$reqpackages:
|
||||
ensure => $pkg_ensure,
|
||||
}
|
||||
}
|
||||
}</pre>
|
||||
</td>
|
||||
|
||||
191
doc/puppet_classes/cd_haproxy_3A_3Amain_3A_3Auser.html
Normal file
191
doc/puppet_classes/cd_haproxy_3A_3Amain_3A_3Auser.html
Normal file
@@ -0,0 +1,191 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>
|
||||
Puppet Class: cd_haproxy::main::user
|
||||
|
||||
— Documentation by YARD 0.9.16
|
||||
|
||||
</title>
|
||||
|
||||
<link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
|
||||
|
||||
<link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
|
||||
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
pathId = "puppet_classes::cd_haproxy::main::user";
|
||||
relpath = '../';
|
||||
</script>
|
||||
|
||||
|
||||
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
||||
|
||||
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="nav_wrap">
|
||||
<iframe id="nav" src="../puppet_class_list.html?1"></iframe>
|
||||
<div id="resizer"></div>
|
||||
</div>
|
||||
|
||||
<div id="main" tabindex="-1">
|
||||
<div id="header">
|
||||
<div id="menu">
|
||||
|
||||
<a href="../_index.html">Index (c)</a> »
|
||||
<span class='title'><span class='object_link'>Puppet Classes</span></span>
|
||||
»
|
||||
<span class="title">cd_haproxy::main::user</span>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="search">
|
||||
|
||||
<a class="full_list_link" id="puppet_class_list_link"
|
||||
href="../puppet_class_list.html">
|
||||
|
||||
<svg width="24" height="24">
|
||||
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
||||
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
||||
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
||||
</svg>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
<div id="content"><h1>Puppet Class: cd_haproxy::main::user</h1>
|
||||
<div class="box_info">
|
||||
|
||||
<dl>
|
||||
<dt>Inherits:</dt>
|
||||
<dd><span class='object_link'><a href="cd_haproxy_3A_3Aparams.html" title="puppet_classes::cd_haproxy::params (puppet_class)">cd_haproxy::params</a></span></dd>
|
||||
</dl>
|
||||
|
||||
|
||||
<dl>
|
||||
<dt>Defined in:</dt>
|
||||
<dd>
|
||||
manifests/main/user.pp
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<h2>Summary</h2>
|
||||
Class manages service users for cd_haproxy.
|
||||
|
||||
<h2>Overview</h2>
|
||||
<div class="docstring">
|
||||
<div class="discussion">
|
||||
|
||||
<p>cd_haproxy::main::user.pp Module name: cd_haproxy Author: Arne Teuke
|
||||
(arne_teuke@ConfDroid.com)</p>
|
||||
|
||||
<h1 id="label-License-3A">License:</h1>
|
||||
|
||||
<p>This file is part of cd_haproxy.</p>
|
||||
|
||||
<p>cd_haproxy is used for providing automatic configuration of HAproxy
|
||||
Copyright (C) 2016 ConfDroid (copyright@ConfDroid.com) This program is
|
||||
free software: you can redistribute it and/or modify it under the terms of
|
||||
the GNU General Public License as published by the Free Software
|
||||
Foundation, either version 3 of the License, or (at your option) any later
|
||||
version.</p>
|
||||
|
||||
<p>This program is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.</p>
|
||||
|
||||
<p>You should have received a copy of the GNU General Public License along
|
||||
with this program. If not, see <a
|
||||
href="http://www.gnu.org/licenses">www.gnu.org/licenses</a>/.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="tags">
|
||||
|
||||
|
||||
</div><div class="method_details_list">
|
||||
<table class="source_code">
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="lines">
|
||||
|
||||
|
||||
23
|
||||
24
|
||||
25
|
||||
26
|
||||
27
|
||||
28
|
||||
29
|
||||
30
|
||||
31
|
||||
32
|
||||
33
|
||||
34
|
||||
35
|
||||
36
|
||||
37
|
||||
38
|
||||
39
|
||||
40
|
||||
41
|
||||
42
|
||||
43
|
||||
44
|
||||
45
|
||||
46
|
||||
47
|
||||
48</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre class="code"><span class="info file"># File 'manifests/main/user.pp', line 23</span>
|
||||
|
||||
class cd_haproxy::main::user (
|
||||
|
||||
) inherits cd_haproxy::params {
|
||||
|
||||
if $fqdn == $hy_host_fqdn {
|
||||
require cd_haproxy::main::install
|
||||
|
||||
# manage user
|
||||
user { $hy_user:
|
||||
ensure => present,
|
||||
name => $hy_user,
|
||||
allowdupe => false,
|
||||
comment => $hy_user_comment,
|
||||
gid => $hy_user,
|
||||
managehome => true,
|
||||
home => $hy_user_home,
|
||||
shell => $hy_user_shell,
|
||||
}
|
||||
|
||||
group { $hy_user:
|
||||
ensure => present,
|
||||
name => $hy_user,
|
||||
allowdupe => false,
|
||||
}
|
||||
}
|
||||
}</pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Generated by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>.
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -69,6 +69,8 @@
|
||||
|
||||
<span class='object_link'><a href="cd_haproxy_3A_3Amain_3A_3Adirs.html" title="puppet_classes::cd_haproxy::main::dirs (puppet_class)">cd_haproxy::main::dirs</a></span><br/>
|
||||
|
||||
<span class='object_link'><a href="cd_haproxy_3A_3Amain_3A_3Auser.html" title="puppet_classes::cd_haproxy::main::user (puppet_class)">cd_haproxy::main::user</a></span><br/>
|
||||
|
||||
<span class='object_link'><a href="cd_haproxy_3A_3Amain_3A_3Afiles.html" title="puppet_classes::cd_haproxy::main::files (puppet_class)">cd_haproxy::main::files</a></span><br/>
|
||||
|
||||
<span class='object_link'><a href="cd_haproxy_3A_3Amain_3A_3Aconfig.html" title="puppet_classes::cd_haproxy::main::config (puppet_class)">cd_haproxy::main::config</a></span><br/>
|
||||
@@ -225,8 +227,6 @@ fqdns via array.</p>
|
||||
<span class='type'>(<tt>string</tt>)</span>
|
||||
|
||||
|
||||
<em class="default">(defaults to: <tt>'http'</tt>)</em>
|
||||
|
||||
|
||||
—
|
||||
<div class='inline'>
|
||||
@@ -244,8 +244,6 @@ fqdns via array.</p>
|
||||
<span class='type'>(<tt>string</tt>)</span>
|
||||
|
||||
|
||||
<em class="default">(defaults to: <tt>''</tt>)</em>
|
||||
|
||||
|
||||
—
|
||||
<div class='inline'>
|
||||
@@ -264,8 +262,6 @@ to <code>tcp</code>.</p>
|
||||
<span class='type'>(<tt>string</tt>)</span>
|
||||
|
||||
|
||||
<em class="default">(defaults to: <tt>''</tt>)</em>
|
||||
|
||||
|
||||
—
|
||||
<div class='inline'>
|
||||
@@ -275,6 +271,84 @@ to <code>tcp</code>.</p>
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
|
||||
<span class='name'>hy_http_port</span>
|
||||
|
||||
|
||||
<span class='type'>(<tt>Any</tt>)</span>
|
||||
|
||||
|
||||
<em class="default">(defaults to: <tt>'80'</tt>)</em>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
|
||||
<span class='name'>hy_https_port</span>
|
||||
|
||||
|
||||
<span class='type'>(<tt>Any</tt>)</span>
|
||||
|
||||
|
||||
<em class="default">(defaults to: <tt>'443'</tt>)</em>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
|
||||
<span class='name'>hy_user_name</span>
|
||||
|
||||
|
||||
<span class='type'>(<tt>Any</tt>)</span>
|
||||
|
||||
|
||||
<em class="default">(defaults to: <tt>'haproxy'</tt>)</em>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
|
||||
<span class='name'>hy_user_comment</span>
|
||||
|
||||
|
||||
<span class='type'>(<tt>Any</tt>)</span>
|
||||
|
||||
|
||||
<em class="default">(defaults to: <tt>'haproxy user'</tt>)</em>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
|
||||
<span class='name'>hy_user_home</span>
|
||||
|
||||
|
||||
<span class='type'>(<tt>Any</tt>)</span>
|
||||
|
||||
|
||||
<em class="default">(defaults to: <tt>'/var/lib/haproxy'</tt>)</em>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
|
||||
<span class='name'>hy_user_shell</span>
|
||||
|
||||
|
||||
<span class='type'>(<tt>Any</tt>)</span>
|
||||
|
||||
|
||||
<em class="default">(defaults to: <tt>'/sbin/nologin'</tt>)</em>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
@@ -313,33 +387,49 @@ to <code>tcp</code>.</p>
|
||||
65
|
||||
66
|
||||
67
|
||||
68</pre>
|
||||
68
|
||||
69
|
||||
70
|
||||
71
|
||||
72
|
||||
73
|
||||
74
|
||||
75
|
||||
76</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre class="code"><span class="info file"># File 'manifests/params.pp', line 40</span>
|
||||
|
||||
class cd_haproxy::params (
|
||||
|
||||
$pkg_ensure = 'latest',
|
||||
$reqpackages = ['haproxy'],
|
||||
$pkg_ensure = 'latest',
|
||||
$reqpackages = ['haproxy'],
|
||||
|
||||
$hy_host_fqdn = "proxy.${::domain}",
|
||||
$hy_host_fqdn = "proxy.${::domain}",
|
||||
|
||||
# firewall
|
||||
$hy_manage_fw = true,
|
||||
$hy_fw_order_no = '50',
|
||||
$hy_manage_fw = true,
|
||||
$hy_fw_order_no = '50',
|
||||
|
||||
# main config
|
||||
$hy_proxy_mode = 'http',
|
||||
$hy_fe_port = '',
|
||||
$hy_be_port = '',
|
||||
$hy_http_port = '80',
|
||||
$hy_https_port = '443',
|
||||
|
||||
# user
|
||||
$hy_user_name = 'haproxy',
|
||||
$hy_user_comment = 'haproxy user',
|
||||
$hy_user_home = '/var/lib/haproxy',
|
||||
$hy_user_shell = '/sbin/nologin',
|
||||
|
||||
) {
|
||||
|
||||
# service
|
||||
$hy_service = 'haproxy'
|
||||
$hy_service = 'haproxy'
|
||||
|
||||
# installation section
|
||||
# directories
|
||||
|
||||
|
||||
# files
|
||||
|
||||
|
||||
# includes must be last
|
||||
|
||||
Reference in New Issue
Block a user