diff --git a/CHANGELOG.md b/CHANGELOG.md
index ad98dfb..e371168 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,6 +8,16 @@ Changelog of Git Changelog.
diff --git a/doc/puppet_classes/cd_haproxy_3A_3Afirewall_3A_3Aiptables.html b/doc/puppet_classes/cd_haproxy_3A_3Afirewall_3A_3Aiptables.html
index e4fca56..a6f2326 100644
--- a/doc/puppet_classes/cd_haproxy_3A_3Afirewall_3A_3Aiptables.html
+++ b/doc/puppet_classes/cd_haproxy_3A_3Afirewall_3A_3Aiptables.html
@@ -136,19 +136,7 @@ href="http://www.gnu.org/licenses">www.gnu.org/licenses/.
40
41
42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
+43
# File 'manifests/firewall/iptables.pp', line 23
@@ -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
-
- }
}
diff --git a/doc/puppet_classes/cd_haproxy_3A_3Amain_3A_3Aconfig.html b/doc/puppet_classes/cd_haproxy_3A_3Amain_3A_3Aconfig.html
index 6aef493..653cdb4 100644
--- a/doc/puppet_classes/cd_haproxy_3A_3Amain_3A_3Aconfig.html
+++ b/doc/puppet_classes/cd_haproxy_3A_3Amain_3A_3Aconfig.html
@@ -132,7 +132,7 @@ class cd_haproxy::main::config (
) inherits cd_haproxy::params {
- require cd_haproxy::server::service
+ include cd_haproxy::server::service
}
diff --git a/doc/puppet_classes/cd_haproxy_3A_3Amain_3A_3Adirs.html b/doc/puppet_classes/cd_haproxy_3A_3Amain_3A_3Adirs.html
index 0361fc5..82a30ae 100644
--- a/doc/puppet_classes/cd_haproxy_3A_3Amain_3A_3Adirs.html
+++ b/doc/puppet_classes/cd_haproxy_3A_3Amain_3A_3Adirs.html
@@ -125,9 +125,7 @@ href="http://www.gnu.org/licenses">www.gnu.org/licenses/.
29
30
31
-32
-33
-34
+32
# File 'manifests/main/dirs.pp', line 23
@@ -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
}
diff --git a/doc/puppet_classes/cd_haproxy_3A_3Amain_3A_3Afiles.html b/doc/puppet_classes/cd_haproxy_3A_3Amain_3A_3Afiles.html
index 3abff53..03096fe 100644
--- a/doc/puppet_classes/cd_haproxy_3A_3Amain_3A_3Afiles.html
+++ b/doc/puppet_classes/cd_haproxy_3A_3Amain_3A_3Afiles.html
@@ -123,9 +123,7 @@ href="http://www.gnu.org/licenses">www.gnu.org/licenses/.
27
28
29
-30
-31
-32
+30
# File 'manifests/main/files.pp', line 23
@@ -135,9 +133,7 @@ class cd_haproxy::main::files (
) inherits cd_haproxy::params {
if $fqdn == $hy_host_fqdn {
-
require cd_haproxy::main::dirs
-
}
}
diff --git a/doc/puppet_classes/cd_haproxy_3A_3Amain_3A_3Ainstall.html b/doc/puppet_classes/cd_haproxy_3A_3Amain_3A_3Ainstall.html
index ec4388e..bda5caa 100644
--- a/doc/puppet_classes/cd_haproxy_3A_3Amain_3A_3Ainstall.html
+++ b/doc/puppet_classes/cd_haproxy_3A_3Amain_3A_3Ainstall.html
@@ -124,7 +124,9 @@ href="http://www.gnu.org/licenses">www.gnu.org/licenses/.
28
29
30
-31
+31
+32
+33
# File 'manifests/main/install.pp', line 24
@@ -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,
+ }
}
}
diff --git a/doc/puppet_classes/cd_haproxy_3A_3Amain_3A_3Auser.html b/doc/puppet_classes/cd_haproxy_3A_3Amain_3A_3Auser.html
new file mode 100644
index 0000000..306588f
--- /dev/null
+++ b/doc/puppet_classes/cd_haproxy_3A_3Amain_3A_3Auser.html
@@ -0,0 +1,191 @@
+
+
+
+
+
+
+ Puppet Class: cd_haproxy::main::user
+
+ — Documentation by YARD 0.9.16
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Puppet Class: cd_haproxy::main::user
+
+
+
+ Inherits:
+ cd_haproxy::params
+
+
+
+
+ Defined in:
+
+ manifests/main/user.pp
+
+
+
+
+
Summary
+ Class manages service users for cd_haproxy.
+
+
Overview
+
+
+
+
cd_haproxy::main::user.pp Module name: cd_haproxy Author: Arne Teuke
+(arne_teuke@ConfDroid.com)
+
+
License:
+
+
This file is part of cd_haproxy.
+
+
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.
+
+
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.
+
+
You should have received a copy of the GNU General Public License along
+with this program. If not, see www.gnu.org/licenses /.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+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
+
+
+ # File 'manifests/main/user.pp', line 23
+
+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,
+ }
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/doc/puppet_classes/cd_haproxy_3A_3Aparams.html b/doc/puppet_classes/cd_haproxy_3A_3Aparams.html
index 71f86d3..56683bf 100644
--- a/doc/puppet_classes/cd_haproxy_3A_3Aparams.html
+++ b/doc/puppet_classes/cd_haproxy_3A_3Aparams.html
@@ -69,6 +69,8 @@
cd_haproxy::main::dirs
+ cd_haproxy::main::user
+
cd_haproxy::main::files
cd_haproxy::main::config
@@ -225,8 +227,6 @@ fqdns via array.
(string )
- (defaults to: 'http' )
-
—
@@ -244,8 +244,6 @@ fqdns via array.
(string )
-
(defaults to: '' )
-
—
@@ -264,8 +262,6 @@ to
tcp.
(string )
-
(defaults to: '' )
-
—
@@ -275,6 +271,84 @@ to
tcp.
+
+
+ hy_http_port
+
+
+ (Any )
+
+
+ (defaults to: '80' )
+
+
+
+
+
+
+ hy_https_port
+
+
+ (Any )
+
+
+ (defaults to: '443' )
+
+
+
+
+
+
+ hy_user_name
+
+
+ (Any )
+
+
+ (defaults to: 'haproxy' )
+
+
+
+
+
+
+ hy_user_comment
+
+
+ (Any )
+
+
+ (defaults to: 'haproxy user' )
+
+
+
+
+
+
+ hy_user_home
+
+
+ (Any )
+
+
+ (defaults to: '/var/lib/haproxy' )
+
+
+
+
+
+
+ hy_user_shell
+
+
+ (Any )
+
+
+ (defaults to: '/sbin/nologin' )
+
+
+
+
@@ -313,33 +387,49 @@ to
tcp.
65
66
67
-68
+68
+69
+70
+71
+72
+73
+74
+75
+76
# 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_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
diff --git a/doc/puppet_defined_type_list.html b/doc/puppet_defined_type_list.html
new file mode 100644
index 0000000..b481508
--- /dev/null
+++ b/doc/puppet_defined_type_list.html
@@ -0,0 +1,54 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Defined Type List
+
+
+
+
+
+
diff --git a/doc/puppet_defined_types/cd_haproxy_3A_3Aserver_3A_3Aproxy.html b/doc/puppet_defined_types/cd_haproxy_3A_3Aserver_3A_3Aproxy.html
new file mode 100644
index 0000000..2d173ce
--- /dev/null
+++ b/doc/puppet_defined_types/cd_haproxy_3A_3Aserver_3A_3Aproxy.html
@@ -0,0 +1,142 @@
+
+
+
+
+
+
+ Defined Type: cd_haproxy::server::proxy
+
+ — Documentation by YARD 0.9.16
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Defined Type: cd_haproxy::server::proxy
+
+
+ Defined in:
+
+ manifests/server/proxy.pp
+
+
+
+
+
Summary
+ Define manages the proxies for cd_haproxy.
+
+
Overview
+
+
+
+
cd_haproxy::server::proxy.pp Module name: cd_haproxy Author: Arne Teuke
+(arne_teuke@ConfDroid.com)
+
+
License:
+
+
This file is part of cd_haproxy.
+
+
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.
+
+
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.
+
+
You should have received a copy of the GNU General Public License along
+with this program. If not, see www.gnu.org/licenses /.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+23
+24
+25
+26
+27
+
+
+ # File 'manifests/server/proxy.pp', line 23
+
+define cd_haproxy :: server :: proxy (
+
+) {
+
+}
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file