Skip to content

Commit

Permalink
Merge pull request #291 from gerases/make-regsubst-global
Browse files Browse the repository at this point in the history
Replace all occurrences of illegal chars in the name var
  • Loading branch information
bastelfreak authored Jan 26, 2024
2 parents df51ce8 + 8bb96c8 commit 2db3fc5
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 4 deletions.
9 changes: 9 additions & 0 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -1477,6 +1477,7 @@ The following parameters are available in the `keepalived::vrrp::script` defined
* [`user`](#-keepalived--vrrp--script--user)
* [`group`](#-keepalived--vrrp--script--group)
* [`no_weight`](#-keepalived--vrrp--script--no_weight)
* [`init_fail`](#-keepalived--vrrp--script--init_fail)

##### <a name="-keepalived--vrrp--script--interval"></a>`interval`

Expand Down Expand Up @@ -1546,6 +1547,14 @@ Data type: `Any`



Default value: `false`

##### <a name="-keepalived--vrrp--script--init_fail"></a>`init_fail`

Data type: `Any`

assume script initially is in failed state if true.

Default value: `false`

### <a name="keepalived--vrrp--sync_group"></a>`keepalived::vrrp::sync_group`
Expand Down
2 changes: 1 addition & 1 deletion manifests/lvs/real_server.pp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
Stdlib::Port $port,
Keepalived::Options $options = {},
) {
$_name = regsubst($name, '[:\/\n]', '')
$_name = regsubst($name, '[:\/\n]', '', 'G')

concat::fragment { "keepalived.conf_lvs_real_server_${_name}":
target => "${keepalived::config_dir}/keepalived.conf",
Expand Down
2 changes: 1 addition & 1 deletion manifests/lvs/virtual_server.pp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
Hash $real_server_options = {},
Optional[Stdlib::Fqdn] $virtualhost = undef,
) {
$_name = regsubst($name, '[:\/\n]', '')
$_name = regsubst($name, '[:\/\n]', '', 'G')

unless $fwmark {
assert_type(Stdlib::Port, $port)
Expand Down
2 changes: 1 addition & 1 deletion manifests/vrrp/script.pp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
$no_weight = false,
$init_fail = false,
) {
$_name = regsubst($name, '[:\/\n]', '')
$_name = regsubst($name, '[:\/\n]', '', 'G')

if ! $weight {
$weight_real = 2
Expand Down
2 changes: 1 addition & 1 deletion manifests/vrrp/sync_group.pp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
Boolean $global_tracking = false,
Optional[Variant[String, Array[String]]] $track_interface = undef,
) {
$_name = regsubst($name, '[:\/\n]', '')
$_name = regsubst($name, '[:\/\n]', '', 'G')

concat::fragment { "keepalived.conf_vrrp_sync_group_${_name}":
target => "${keepalived::config_dir}/keepalived.conf",
Expand Down

0 comments on commit 2db3fc5

Please sign in to comment.