diff --git a/CHANGELOG.md b/CHANGELOG.md index e371168..6d02381 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,16 @@ Changelog of Git Changelog.
+
+
INSTALLATION * install binaries
+INSTALLATION * install rpm binaries
-CONFIGURATION
+CONFIGURATION * manage haproxy user * manage directories (file system +permissions, selinux context) * manage files (file system permissions, +content, selinux context)
-SERVICE * manage service
+SERVICE * manage haproxy service
cd_certbot for -automating TLS certificates for https
+INSTALLATION * install binaries
+INSTALLATION * install rpm binaries
-CONFIGURATION
+CONFIGURATION * manage haproxy user * manage directories (file system +permissions, selinux context) * manage files (file system permissions, +content, selinux context)
-SERVICE * manage service
+SERVICE * manage haproxy service
cd_certbot for -automating TLS certificates for https
+# File 'manifests/main/dirs.pp', line 23
@@ -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,
+ }
}
-
-
}
# File 'manifests/main/files.pp', line 23
@@ -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',
+ }
}
}
tcp.
73
74
75
-76
+76
+77
+78
# File 'manifests/params.pp', line 40
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