hostname - Correct distribution for various Linux distros based on output from distro library (#56936)

* Adjust hostname classes based on output from distro

Corrects the following:
- OpenSUSE Leap
- ArchARM
- Oracle Linux

* Add CoreOS and Clear Linux distributions
This commit is contained in:
Sam Doran 2019-06-21 14:29:41 -04:00 committed by GitHub
parent d010510835
commit bd55617a5b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 27 additions and 1 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- hostname - make module work on CoreOS, Oracle Linux, Clear Linux, OpenSUSE Leap, ArchARM (https://github.com/ansible/ansible/issues/42726)

View file

@ -583,12 +583,24 @@ class OpenSUSEHostname(Hostname):
strategy_class = SystemdStrategy
class OpenSUSELeapHostname(Hostname):
platform = 'Linux'
distribution = 'Opensuse-leap'
strategy_class = SystemdStrategy
class ArchHostname(Hostname):
platform = 'Linux'
distribution = 'Arch'
strategy_class = SystemdStrategy
class ArchARMHostname(Hostname):
platform = 'Linux'
distribution = 'Archarm'
strategy_class = SystemdStrategy
class RHELHostname(Hostname):
platform = 'Linux'
distribution = 'Redhat'
@ -601,12 +613,24 @@ class CentOSHostname(Hostname):
strategy_class = RedHatStrategy
class ClearLinuxHostname(Hostname):
platform = 'Linux'
distribution = 'Clear-linux-os'
strategy_class = SystemdStrategy
class CloudlinuxHostname(Hostname):
platform = 'Linux'
distribution = 'Cloudlinux'
strategy_class = RedHatStrategy
class CoreosHostname(Hostname):
platform = 'Linux'
distribution = 'Coreos'
strategy_class = SystemdStrategy
class ScientificHostname(Hostname):
platform = 'Linux'
distribution = 'Scientific'
@ -615,7 +639,7 @@ class ScientificHostname(Hostname):
class OracleLinuxHostname(Hostname):
platform = 'Linux'
distribution = 'Oracle'
distribution = 'Ol'
strategy_class = RedHatStrategy