[stable-2.8] 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
(cherry picked from commit bd55617a5b
)
Co-authored-by: Sam Doran <sdoran@redhat.com>
This commit is contained in:
parent
6bd8e3d002
commit
2cc8f3afb7
2 changed files with 27 additions and 1 deletions
2
changelogs/fragments/hostname-update-distros.yaml
Normal file
2
changelogs/fragments/hostname-update-distros.yaml
Normal 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)
|
|
@ -583,12 +583,24 @@ class OpenSUSEHostname(Hostname):
|
||||||
strategy_class = SystemdStrategy
|
strategy_class = SystemdStrategy
|
||||||
|
|
||||||
|
|
||||||
|
class OpenSUSELeapHostname(Hostname):
|
||||||
|
platform = 'Linux'
|
||||||
|
distribution = 'Opensuse-leap'
|
||||||
|
strategy_class = SystemdStrategy
|
||||||
|
|
||||||
|
|
||||||
class ArchHostname(Hostname):
|
class ArchHostname(Hostname):
|
||||||
platform = 'Linux'
|
platform = 'Linux'
|
||||||
distribution = 'Arch'
|
distribution = 'Arch'
|
||||||
strategy_class = SystemdStrategy
|
strategy_class = SystemdStrategy
|
||||||
|
|
||||||
|
|
||||||
|
class ArchARMHostname(Hostname):
|
||||||
|
platform = 'Linux'
|
||||||
|
distribution = 'Archarm'
|
||||||
|
strategy_class = SystemdStrategy
|
||||||
|
|
||||||
|
|
||||||
class RHELHostname(Hostname):
|
class RHELHostname(Hostname):
|
||||||
platform = 'Linux'
|
platform = 'Linux'
|
||||||
distribution = 'Redhat'
|
distribution = 'Redhat'
|
||||||
|
@ -601,12 +613,24 @@ class CentOSHostname(Hostname):
|
||||||
strategy_class = RedHatStrategy
|
strategy_class = RedHatStrategy
|
||||||
|
|
||||||
|
|
||||||
|
class ClearLinuxHostname(Hostname):
|
||||||
|
platform = 'Linux'
|
||||||
|
distribution = 'Clear-linux-os'
|
||||||
|
strategy_class = SystemdStrategy
|
||||||
|
|
||||||
|
|
||||||
class CloudlinuxHostname(Hostname):
|
class CloudlinuxHostname(Hostname):
|
||||||
platform = 'Linux'
|
platform = 'Linux'
|
||||||
distribution = 'Cloudlinux'
|
distribution = 'Cloudlinux'
|
||||||
strategy_class = RedHatStrategy
|
strategy_class = RedHatStrategy
|
||||||
|
|
||||||
|
|
||||||
|
class CoreosHostname(Hostname):
|
||||||
|
platform = 'Linux'
|
||||||
|
distribution = 'Coreos'
|
||||||
|
strategy_class = SystemdStrategy
|
||||||
|
|
||||||
|
|
||||||
class ScientificHostname(Hostname):
|
class ScientificHostname(Hostname):
|
||||||
platform = 'Linux'
|
platform = 'Linux'
|
||||||
distribution = 'Scientific'
|
distribution = 'Scientific'
|
||||||
|
@ -615,7 +639,7 @@ class ScientificHostname(Hostname):
|
||||||
|
|
||||||
class OracleLinuxHostname(Hostname):
|
class OracleLinuxHostname(Hostname):
|
||||||
platform = 'Linux'
|
platform = 'Linux'
|
||||||
distribution = 'Oracle'
|
distribution = 'Ol'
|
||||||
strategy_class = RedHatStrategy
|
strategy_class = RedHatStrategy
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue