Skip to content

Commit

Permalink
Replace all occurences of illegal chars in the name var
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergei Gerasenko committed Jul 13, 2023
1 parent a08c9d9 commit 98c5f30
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
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/instance.pp
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@
Boolean $use_vmac_addr = false,
Boolean $native_ipv6 = false,
) {
$_name = regsubst($name, '[:\/\n]', '')
$_name = regsubst($name, '[:\/\n]', '', 'G')
$unicast_peer_array = [$unicast_peers].flatten
$auth_pass_unsensitive = if $auth_pass =~ Sensitive {
$auth_pass.unwrap
Expand Down
2 changes: 1 addition & 1 deletion manifests/vrrp/script.pp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
$group = undef,
$no_weight = 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
2 changes: 1 addition & 1 deletion manifests/vrrp/unicast_peer.pp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
) {
assert_private()

$_inst = regsubst($instance, '[:\/\n]', '')
$_inst = regsubst($instance, '[:\/\n]', '', 'G')

concat::fragment { "keepalived.conf_vrrp_instance_${_inst}_upeers_peer_${ip_address}":
target => "${keepalived::config_dir}/keepalived.conf",
Expand Down

0 comments on commit 98c5f30

Please sign in to comment.