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
pull/58215/head
Sam Doran 6 years ago committed by GitHub
parent d010510835
commit bd55617a5b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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)

@ -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

Loading…
Cancel
Save