summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Doran <sdoran@redhat.com>2021-05-17 05:24:35 -0400
committerGitHub <noreply@github.com>2021-05-17 04:24:35 -0500
commitdd7118c4337424766abd3d73dec9fa934c40501a (patch)
treed73aafa5628f78f61541aaa45027e77494a6665c
parentebf7233e357494e5d2edb8ce6b5e5960897029b2 (diff)
downloadansible-dd7118c4337424766abd3d73dec9fa934c40501a.tar.gz
[stable-2.11] hostname - add Rocky Linux support (#74545) (#74560)
(cherry picked from commit 2d41e5f99a4230ff730ba1bfc9c9f37836f3f67f) Co-authored-by: Louis Abel <nazunalika@users.noreply.github.com>
-rw-r--r--changelogs/fragments/support_rocky_linux_hostname.yml2
-rw-r--r--lib/ansible/modules/hostname.py6
2 files changed, 8 insertions, 0 deletions
diff --git a/changelogs/fragments/support_rocky_linux_hostname.yml b/changelogs/fragments/support_rocky_linux_hostname.yml
new file mode 100644
index 0000000000..8dff2bd356
--- /dev/null
+++ b/changelogs/fragments/support_rocky_linux_hostname.yml
@@ -0,0 +1,2 @@
+bugfixes:
+ - hostname - Add Rocky Linux support
diff --git a/lib/ansible/modules/hostname.py b/lib/ansible/modules/hostname.py
index dc775547a9..26556fc809 100644
--- a/lib/ansible/modules/hostname.py
+++ b/lib/ansible/modules/hostname.py
@@ -1001,6 +1001,12 @@ class PopHostname(Hostname):
strategy_class = DebianStrategy
+class RockyHostname(Hostname):
+ platform = 'Linux'
+ distribution = 'Rocky'
+ strategy_class = SystemdStrategy
+
+
def main():
module = AnsibleModule(
argument_spec=dict(