From a4528a811e5750b218f33ac4a7d563138b7452ec Mon Sep 17 00:00:00 2001 From: Arne Teuke Date: Sun, 30 Dec 2018 15:18:37 +0100 Subject: [PATCH] adds service control and updates README --- README.md | 13 +++++++++++++ manifests/server/service.pp | 1 + 2 files changed, 14 insertions(+) diff --git a/README.md b/README.md index 560e878..908cced 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,7 @@ CONFIGURATION * manage haproxy user * manage directories (file system permissions, selinux context) * manage files (file system permissions, content, selinux context) +* manage proxy instances through a define SERVICE * manage haproxy service @@ -82,7 +83,19 @@ The [full list of Parameters](https://confdroid.com/2017/08/cd_haproxy-parameter #### Optional Parameters +### Proxy Configuration +The proxy instances are configured in /etc/haproxy/haproxy.cfg, which is concatenated from various templates through a define in this puppet module. +In order to create proxy instances, you will need an external class, which addresses the define, like so: +``` + cd_haproxy::server::proxy { 'testing': + frontend_name => 'test01-frontend', + acl_rule => 'test01-acl', + backend_name => 'test01-backend', + } +``` + +This allows the puppet module to create the sections in the configuration file as required. The haproxy service will be restarted after the changes in the configuration file are made. ### SELINUX All files and directories are configured with correct selinux context. If selinux is disabled, these contexts are ignored. diff --git a/manifests/server/service.pp b/manifests/server/service.pp index a6e6c3f..fb9bffd 100644 --- a/manifests/server/service.pp +++ b/manifests/server/service.pp @@ -33,6 +33,7 @@ class cd_haproxy::server::service ( hasstatus => true, hasrestart => true, enable => true, + subscribe => $hy_main_config, } } }