recommit for updates in build 6
This commit is contained in:
@@ -123,11 +123,13 @@ href="https://gitlab.confdroid.com/12WW1160/cd_haproxy/blob/master/CHANGELOG.md"
|
||||
|
||||
<h3 id="label-Features">Features</h3>
|
||||
|
||||
<p>INSTALLATION * install binaries</p>
|
||||
<p>INSTALLATION * install rpm binaries</p>
|
||||
|
||||
<p>CONFIGURATION</p>
|
||||
<p>CONFIGURATION * manage haproxy user * manage directories (file system
|
||||
permissions, selinux context) * manage files (file system permissions,
|
||||
content, selinux context)</p>
|
||||
|
||||
<p>SERVICE * manage service</p>
|
||||
<p>SERVICE * manage haproxy service</p>
|
||||
|
||||
<h3 id="label-Repo+Structure">Repo Structure</h3>
|
||||
|
||||
@@ -145,8 +147,9 @@ href="https://gitlab.confdroid.com/12WW1160/cd_haproxy/blob/master/CHANGELOG.md"
|
||||
href="https://gitlab.confdroid.com/12WW1160/cd_resources">cd_resources</a>
|
||||
for managing yum base repos</p>
|
||||
</li><li>
|
||||
<p><a href="https://gitlab.confdroid.com/12WW1160/certbot">cd_certbot</a> for
|
||||
automating TLS certificates for https</p>
|
||||
<p><a href="https://gitlab.confdroid.com/12ww1160/cd_concat">cd_concat</a> or
|
||||
<a href="https://github.com/puppetlabs/puppetlabs-concat">concat</a> for
|
||||
managing file fragments</p>
|
||||
</li></ul>
|
||||
|
||||
<h3 id="label-Deployment">Deployment</h3>
|
||||
|
||||
@@ -123,11 +123,13 @@ href="https://gitlab.confdroid.com/12WW1160/cd_haproxy/blob/master/CHANGELOG.md"
|
||||
|
||||
<h3 id="label-Features">Features</h3>
|
||||
|
||||
<p>INSTALLATION * install binaries</p>
|
||||
<p>INSTALLATION * install rpm binaries</p>
|
||||
|
||||
<p>CONFIGURATION</p>
|
||||
<p>CONFIGURATION * manage haproxy user * manage directories (file system
|
||||
permissions, selinux context) * manage files (file system permissions,
|
||||
content, selinux context)</p>
|
||||
|
||||
<p>SERVICE * manage service</p>
|
||||
<p>SERVICE * manage haproxy service</p>
|
||||
|
||||
<h3 id="label-Repo+Structure">Repo Structure</h3>
|
||||
|
||||
@@ -145,8 +147,9 @@ href="https://gitlab.confdroid.com/12WW1160/cd_haproxy/blob/master/CHANGELOG.md"
|
||||
href="https://gitlab.confdroid.com/12WW1160/cd_resources">cd_resources</a>
|
||||
for managing yum base repos</p>
|
||||
</li><li>
|
||||
<p><a href="https://gitlab.confdroid.com/12WW1160/certbot">cd_certbot</a> for
|
||||
automating TLS certificates for https</p>
|
||||
<p><a href="https://gitlab.confdroid.com/12ww1160/cd_concat">cd_concat</a> or
|
||||
<a href="https://github.com/puppetlabs/puppetlabs-concat">concat</a> for
|
||||
managing file fragments</p>
|
||||
</li></ul>
|
||||
|
||||
<h3 id="label-Deployment">Deployment</h3>
|
||||
|
||||
@@ -125,7 +125,17 @@ href="http://www.gnu.org/licenses">www.gnu.org/licenses</a>/.</p>
|
||||
29
|
||||
30
|
||||
31
|
||||
32</pre>
|
||||
32
|
||||
33
|
||||
34
|
||||
35
|
||||
36
|
||||
37
|
||||
38
|
||||
39
|
||||
40
|
||||
41
|
||||
42</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre class="code"><span class="info file"># File 'manifests/main/dirs.pp', line 23</span>
|
||||
@@ -136,9 +146,19 @@ class cd_haproxy::main::dirs (
|
||||
|
||||
if $fqdn == $hy_host_fqdn {
|
||||
require cd_haproxy::main::user
|
||||
|
||||
# main dir
|
||||
file { $hy_main_dir:
|
||||
ensure => directory,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0755',
|
||||
selrange => s0,
|
||||
selrole => object_r,
|
||||
seltype => etc_t,
|
||||
seluser => system_u,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}</pre>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -123,7 +123,26 @@ href="http://www.gnu.org/licenses">www.gnu.org/licenses</a>/.</p>
|
||||
27
|
||||
28
|
||||
29
|
||||
30</pre>
|
||||
30
|
||||
31
|
||||
32
|
||||
33
|
||||
34
|
||||
35
|
||||
36
|
||||
37
|
||||
38
|
||||
39
|
||||
40
|
||||
41
|
||||
42
|
||||
43
|
||||
44
|
||||
45
|
||||
46
|
||||
47
|
||||
48
|
||||
49</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre class="code"><span class="info file"># File 'manifests/main/files.pp', line 23</span>
|
||||
@@ -134,6 +153,25 @@ class cd_haproxy::main::files (
|
||||
|
||||
if $fqdn == $hy_host_fqdn {
|
||||
require cd_haproxy::main::dirs
|
||||
|
||||
# create the concat target
|
||||
concat {$hy_main_config:
|
||||
ensure => present,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0640',
|
||||
selrange => s0,
|
||||
selrole => object_r,
|
||||
seltype => etc_t,
|
||||
seluser => system_u,
|
||||
}
|
||||
|
||||
# create the header
|
||||
concat::fragment { 'header':
|
||||
target => $hy_main_config,
|
||||
content => $hy_config_head_erb,
|
||||
order => '001',
|
||||
}
|
||||
}
|
||||
}</pre>
|
||||
</td>
|
||||
|
||||
@@ -395,41 +395,45 @@ to <code>tcp</code>.</p>
|
||||
73
|
||||
74
|
||||
75
|
||||
76</pre>
|
||||
76
|
||||
77
|
||||
78</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_http_port = '80',
|
||||
$hy_https_port = '443',
|
||||
$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',
|
||||
$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'
|
||||
|
||||
# directories
|
||||
|
||||
$hy_main_dir = '/etc/haproxy'
|
||||
|
||||
# files
|
||||
$hy_main_config = "${hy_main_dir}/haproxy.cfg"
|
||||
$hy_config_head_erb = 'cd_puppet/haproxy_head.erb'
|
||||
|
||||
|
||||
# includes must be last
|
||||
|
||||
Reference in New Issue
Block a user