From d56d0f97e30d728b6ea54149001364afb39c5386 Mon Sep 17 00:00:00 2001 From: Thomas Hucke <github@thucke.de> Date: Sun, 5 Jan 2020 08:07:39 +0100 Subject: [PATCH] Add support for OSCM-distribution in hostname module (#66190) Fixes: #66189 Added subclass to detect the new distribution OSMC --- changelogs/fragments/66189-hostname-osmc.yml | 2 ++ lib/ansible/modules/system/hostname.py | 6 ++++++ 2 files changed, 8 insertions(+) create mode 100644 changelogs/fragments/66189-hostname-osmc.yml diff --git a/changelogs/fragments/66189-hostname-osmc.yml b/changelogs/fragments/66189-hostname-osmc.yml new file mode 100644 index 00000000000..ac2749b8633 --- /dev/null +++ b/changelogs/fragments/66189-hostname-osmc.yml @@ -0,0 +1,2 @@ +bugfixes: +- Added support for OSMC distro in hostname module (https://github.com/ansible/ansible/issues/66189). diff --git a/lib/ansible/modules/system/hostname.py b/lib/ansible/modules/system/hostname.py index 0fa55cd2f8f..af6c13e41b3 100644 --- a/lib/ansible/modules/system/hostname.py +++ b/lib/ansible/modules/system/hostname.py @@ -796,6 +796,12 @@ class NeonHostname(Hostname): strategy_class = DebianStrategy +class OsmcHostname(Hostname): + platform = 'Linux' + distribution = 'Osmc' + strategy_class = SystemdStrategy + + def main(): module = AnsibleModule( argument_spec=dict(