feat: add frontends, backends, listeners
- add a way to define frontends, backends and listeners through hieradata
This commit is contained in:
@@ -1,9 +1,13 @@
|
||||
# profiles::haproxy::mappings
|
||||
class profiles::haproxy::mappings (
|
||||
Array $list = []
|
||||
) {
|
||||
haproxy::mapfile { 'domains-to-backends':
|
||||
ensure => 'present',
|
||||
mappings => $list,
|
||||
class profiles::haproxy::mappings {
|
||||
|
||||
# for each mapping:
|
||||
$mappings = lookup('profiles::haproxy::mappings')
|
||||
$mappings.each |$mapping, $data| {
|
||||
|
||||
# create mapping
|
||||
haproxy::mapfile { $mapping:
|
||||
* => $data,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user