From 223cac3f39f693471011574dc3511f2a6f1c9fc7 Mon Sep 17 00:00:00 2001 From: Tim Rupp Date: Fri, 28 Aug 2015 20:35:24 -0700 Subject: [PATCH] Add hostname support for Kali linux 2.0 This patch allows the hostname module to detect and set the hostname for a Kali Linux 2.0 installation. Without this patch, the hostname module raises the following error hostname module cannot be used on platform Linux (Kali) Kali is based off of Debian. --- lib/ansible/modules/system/hostname.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/ansible/modules/system/hostname.py b/lib/ansible/modules/system/hostname.py index 9c99b9f00cf..322f9f28972 100644 --- a/lib/ansible/modules/system/hostname.py +++ b/lib/ansible/modules/system/hostname.py @@ -491,6 +491,11 @@ class DebianHostname(Hostname): distribution = 'Debian' strategy_class = DebianStrategy +class KaliHostname(Hostname): + platform = 'Linux' + distribution = 'Kali' + strategy_class = DebianStrategy + class UbuntuHostname(Hostname): platform = 'Linux' distribution = 'Ubuntu'