From 8f77e957652fa9c4beb62ee5bf81ae5ed23e9c03 Mon Sep 17 00:00:00 2001 From: log-e <31824303+log-e@users.noreply.github.com> Date: Tue, 8 Dec 2020 23:42:42 +0800 Subject: [PATCH] Add alinux hostname module support (#72894) --- .../fragments/72894-add-alinux-hostname-module-support.yml | 2 ++ lib/ansible/modules/hostname.py | 6 ++++++ 2 files changed, 8 insertions(+) create mode 100644 changelogs/fragments/72894-add-alinux-hostname-module-support.yml diff --git a/changelogs/fragments/72894-add-alinux-hostname-module-support.yml b/changelogs/fragments/72894-add-alinux-hostname-module-support.yml new file mode 100644 index 00000000000..7cf790a013f --- /dev/null +++ b/changelogs/fragments/72894-add-alinux-hostname-module-support.yml @@ -0,0 +1,2 @@ +bugfixes: + - hostname - Fixed an issue where the hostname on the alinux could not be set. \ No newline at end of file diff --git a/lib/ansible/modules/hostname.py b/lib/ansible/modules/hostname.py index 2a13d2ef5a3..95491dba8ac 100644 --- a/lib/ansible/modules/hostname.py +++ b/lib/ansible/modules/hostname.py @@ -812,6 +812,12 @@ class CloudlinuxHostname(Hostname): strategy_class = RedHatStrategy +class AlinuxHostname(Hostname): + platform = 'Linux' + distribution = 'Alinux' + strategy_class = RedHatStrategy + + class CoreosHostname(Hostname): platform = 'Linux' distribution = 'Coreos'