Skip to content

Commit

Permalink
Update redhat.rb
Browse files Browse the repository at this point in the history
Changing regex pattern to include interface names with dots (.). For instance:

ifcfg-bond0.12
  • Loading branch information
TheJamesD committed Mar 6, 2024
1 parent 215567e commit 3168a76
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/puppet/provider/network_config/redhat.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
ALIAS_REGEX = %r{.{1,12}(?<!~|\.bak|\.old|\.orig|\.rpmnew|\.rpmorig|\.rpmsave)}

# @return [Regexp] The regular expression for interface scripts on redhat systems
SCRIPT_REGEX = %r{\Aifcfg-[a-z]+[a-z\d]+(?::#{ALIAS_REGEX}|\.#{VLAN_RANGE_REGEX})?\Z}
SCRIPT_REGEX = %r{\Aifcfg-[a-z]+[a-z\d\.]+(?::#{ALIAS_REGEX}|\.#{VLAN_RANGE_REGEX})?\Z}

Check failure on line 32 in lib/puppet/provider/network_config/redhat.rb

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

Style/RedundantRegexpEscape: Redundant escape inside regexp literal

NAME_MAPPINGS = {
ipaddress: 'IPADDR',
Expand Down

0 comments on commit 3168a76

Please sign in to comment.