mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Add support for Devuan in hostname module (#25525)
Fixes #25395 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
parent
4e6fee212a
commit
ba4f6de35a
2 changed files with 6 additions and 1 deletions
|
@ -260,7 +260,7 @@ def get_distribution():
|
|||
''' return the distribution name '''
|
||||
if platform.system() == 'Linux':
|
||||
try:
|
||||
supported_dists = platform._supported_dists + ('arch', 'alpine')
|
||||
supported_dists = platform._supported_dists + ('arch', 'alpine', 'devuan')
|
||||
distribution = platform.linux_distribution(supported_dists=supported_dists)[0].capitalize()
|
||||
if not distribution and os.path.isfile('/etc/system-release'):
|
||||
distribution = platform.linux_distribution(supported_dists=['system'])[0].capitalize()
|
||||
|
|
|
@ -707,6 +707,11 @@ class LinaroHostname(Hostname):
|
|||
distribution = 'Linaro'
|
||||
strategy_class = DebianStrategy
|
||||
|
||||
class DevuanHostname(Hostname):
|
||||
platform = 'Linux'
|
||||
distribution = 'Devuan'
|
||||
strategy_class = DebianStrategy
|
||||
|
||||
class GentooHostname(Hostname):
|
||||
platform = 'Linux'
|
||||
distribution = 'Gentoo base system'
|
||||
|
|
Loading…
Reference in a new issue