Skip to content

Commit adabb9c

Browse files
authored
Merge pull request #175 from saz/fix-short-version
fix regex to get repo version
2 parents a6086c0 + 58c8eb2 commit adabb9c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

manifests/repo.pp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
class powerdns::repo inherits powerdns {
33
# The repositories of PowerDNS use a version such as '40' for version 4.0
44
# and 41 for version 4.1.
5-
$authoritative_short_version = regsubst($powerdns::authoritative_version, /^(\d)\.(\d)$/, '\\1\\2', 'G')
6-
$recursor_short_version = regsubst($powerdns::recursor_version, /^(\d)\.(\d)$/, '\\1\\2', 'G')
5+
$authoritative_short_version = regsubst($powerdns::authoritative_version, /^(\d+)\.(\d+)(?:\.\d+)?$/, '\\1\\2', 'G')
6+
$recursor_short_version = regsubst($powerdns::recursor_version, /^(\d+)\.(\d+)(?:\.\d+)?$/, '\\1\\2', 'G')
77

88
case $facts['os']['family'] {
99
'RedHat': {

0 commit comments

Comments
 (0)