Merge pull request #7741 from mgcrea/devel
Add support for Linaro distribution in hostname module
This commit is contained in:
commit
d35d5ac9d1
1 changed files with 7 additions and 2 deletions
|
@ -150,7 +150,7 @@ class DebianStrategy(GenericStrategy):
|
||||||
try:
|
try:
|
||||||
open(self.HOSTNAME_FILE, "a").write("")
|
open(self.HOSTNAME_FILE, "a").write("")
|
||||||
except IOError, err:
|
except IOError, err:
|
||||||
self.module.fail_json(msg="failed to write file: %s" %
|
self.module.fail_json(msg="failed to write file: %s" %
|
||||||
str(err))
|
str(err))
|
||||||
try:
|
try:
|
||||||
f = open(self.HOSTNAME_FILE)
|
f = open(self.HOSTNAME_FILE)
|
||||||
|
@ -183,6 +183,11 @@ class UbuntuHostname(Hostname):
|
||||||
distribution = 'Ubuntu'
|
distribution = 'Ubuntu'
|
||||||
strategy_class = DebianStrategy
|
strategy_class = DebianStrategy
|
||||||
|
|
||||||
|
class LinaroHostname(Hostname):
|
||||||
|
platform = 'Linux'
|
||||||
|
distribution = 'Linaro'
|
||||||
|
strategy_class = DebianStrategy
|
||||||
|
|
||||||
# ===========================================
|
# ===========================================
|
||||||
|
|
||||||
class RedHatStrategy(GenericStrategy):
|
class RedHatStrategy(GenericStrategy):
|
||||||
|
@ -260,7 +265,7 @@ class ScientificLinuxHostname(Hostname):
|
||||||
platform = 'Linux'
|
platform = 'Linux'
|
||||||
distribution = 'Scientific'
|
distribution = 'Scientific'
|
||||||
strategy_class = RedHatStrategy
|
strategy_class = RedHatStrategy
|
||||||
|
|
||||||
# ===========================================
|
# ===========================================
|
||||||
|
|
||||||
class FedoraStrategy(GenericStrategy):
|
class FedoraStrategy(GenericStrategy):
|
||||||
|
|
Loading…
Reference in a new issue