Set pyvers in defaults

This allows openstacklib::defaults to be inherited by each component
module avoiding duplicating the logic currently required when setting
this for the various base distrobutions.

Change-Id: I84b767921d151a61429b2c89e6372c4b447f0d7d
This commit is contained in:
Tobias Urdin 2019-01-09 13:01:28 +01:00 committed by Lee Yarwood
parent 4c29873ab8
commit 489d1573c4
1 changed files with 12 additions and 0 deletions

View File

@ -12,4 +12,16 @@ class openstacklib::defaults {
warning('OpenStack modules support for Puppet 4 is deprecated \
and will be officially unsupported in the T release')
}
if ($::os['family'] == 'Debian') {
$pyvers = '3'
$pyver3 = '3'
} elsif ($::os['name'] == 'Fedora') or
($::os['family'] == 'RedHat' and Integer.new($::os['release']['major']) > 7) {
$pyvers = '3'
$pyver3 = '3.6'
} else {
$pyvers = ''
$pyver3 = '2.7'
}
}