Merge pull request #8146 from rmarchei/8102
fix get_distribution_version() on amazon linux
This commit is contained in:
commit
27b1310ec6
1 changed files with 4 additions and 2 deletions
|
@ -299,7 +299,8 @@ class RedHat5Hostname(Hostname):
|
||||||
class RedHatServerHostname(Hostname):
|
class RedHatServerHostname(Hostname):
|
||||||
platform = 'Linux'
|
platform = 'Linux'
|
||||||
distribution = 'Red hat enterprise linux server'
|
distribution = 'Red hat enterprise linux server'
|
||||||
if LooseVersion(get_distribution_version()) >= LooseVersion("7"):
|
distribution_version = get_distribution_version()
|
||||||
|
if distribution_version and LooseVersion(distribution_version) >= LooseVersion("7"):
|
||||||
strategy_class = FedoraStrategy
|
strategy_class = FedoraStrategy
|
||||||
else:
|
else:
|
||||||
strategy_class = RedHatStrategy
|
strategy_class = RedHatStrategy
|
||||||
|
@ -307,7 +308,8 @@ class RedHatServerHostname(Hostname):
|
||||||
class RedHatWorkstationHostname(Hostname):
|
class RedHatWorkstationHostname(Hostname):
|
||||||
platform = 'Linux'
|
platform = 'Linux'
|
||||||
distribution = 'Red hat enterprise linux workstation'
|
distribution = 'Red hat enterprise linux workstation'
|
||||||
if LooseVersion(get_distribution_version()) >= LooseVersion("7"):
|
distribution_version = get_distribution_version()
|
||||||
|
if distribution_version and LooseVersion(distribution_version) >= LooseVersion("7"):
|
||||||
strategy_class = FedoraStrategy
|
strategy_class = FedoraStrategy
|
||||||
else:
|
else:
|
||||||
strategy_class = RedHatStrategy
|
strategy_class = RedHatStrategy
|
||||||
|
|
Loading…
Reference in a new issue