From dacd2936e0aab10065c4aa93e812ca63168b19c0 Mon Sep 17 00:00:00 2001 From: Arne Teuke Date: Sun, 30 Dec 2018 17:12:36 +0100 Subject: [PATCH] acl template works --- README.md | 7 +++++-- manifests/server/proxy_test.pp | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index cff06e1..d5a7345 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ |Repo Name| version | Build Status| |---|---|---|---| -|`cd_haproxy`| 1.0.1.0 | [![Build Status](https://pipelines.confdroid.com/buildStatus/icon?job=cd_haproxy)](https://pipelines.confdroid.com/job/cd_haproxy/)| +|`cd_haproxy`| 1.0.2.0 | [![Build Status](https://pipelines.confdroid.com/buildStatus/icon?job=cd_haproxy)](https://pipelines.confdroid.com/job/cd_haproxy/)| ### Synopsis `HA Proxy` is a very powerful and popular open source load balanacer to balance incoming requests between multiple instances of web-, application- or database servers etc. @@ -91,12 +91,15 @@ In order to create proxy instances, you will need an external class, which addre ``` cd_haproxy::server::proxy { 'testing': frontend_name => 'test01-frontend', - acl_rule => 'test01-acl', + frontend_mode => 'http', + `acl_rule` => ['too_fast fe_sess_rate ge 10', + 'network_allowed src 0.0.0.0/0'], 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. +Multiple ACLs need to be added as array, and will create one line each. ### SELINUX All files and directories are configured with correct selinux context. If selinux is disabled, these contexts are ignored. diff --git a/manifests/server/proxy_test.pp b/manifests/server/proxy_test.pp index 5510b83..4f51017 100644 --- a/manifests/server/proxy_test.pp +++ b/manifests/server/proxy_test.pp @@ -27,7 +27,8 @@ class cd_haproxy::server::proxy_test ( cd_haproxy::server::proxy { 'testing': frontend_name => 'test01-frontend', frontend_mode => 'http', - acl_rule => ['too_fast fe_sess_rate ge 10','network_allowed src 0.0.0.0/0'], + acl_rule => ['too_fast fe_sess_rate ge 10', + 'network_allowed src 0.0.0.0/0'], backend_name => 'test01-backend', } }