##### SUMMARY
Applying the module HOSTNAME against a box running OSMC (https://osmc.tv/) the following error appears:
`fatal: [raspitest.thucke.de]: FAILED! => {"changed": false, "msg": "hostname module cannot be used on platform Linux (Osmc)"}
`
##### ISSUE TYPE
- Bug Report

##### COMPONENT NAME
Module: hostname

##### ANSIBLE VERSION
```
ansible 2.9.2
  config file = /home/ansible/ansible/ansible.cfg
  configured module search path = ['/home/ansible/ansible/ansible_modules']
  ansible python module location = /usr/lib/python3.7/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 3.7.5 (default, Oct 17 2019, 12:09:47) [GCC 9.2.1 20190827 (Red Hat 9.2.1-1)]
```

##### CONFIGURATION
```
DEFAULT_HOST_LIST(/home/ansible/ansible/ansible.cfg) = ['/home/ansible/ansible/inventory.yml']
DEFAULT_MODULE_PATH(/home/ansible/ansible/ansible.cfg) = ['/home/ansible/ansible/ansible_modules']
DEFAULT_ROLES_PATH(/home/ansible/ansible/ansible.cfg) = ['/home/ansible/ansible/roles', '/home/ansible/ansible/roles']
```

##### OS / ENVIRONMENT
<!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. -->
Target OS: OSMC on Rasperry Pi 2B+ (http://download.osmc.tv/installers/diskimages/OSMC_TGT_rbp2_20191118.img.gz)

##### STEPS TO REPRODUCE
Just apply a playbook with the module against such a machine.

```
- name: HOSTNAME | Setting real hostname
  hostname:
    name: "{{ inetHostname.stdout }}"
```

##### EXPECTED RESULTS
Module end without errors

##### ACTUAL RESULTS
`fatal: [raspitest.thucke.de]: FAILED! => {"changed": false, "msg": "hostname module cannot be used on platform Linux (Osmc)"}
`
"""
    This is a FreeBSD hostname manipulation strategy class - it edits
    the /etc/rc.conf.d/hostname file.
    """
    HOSTNAME_FILE = '/etc/rc.conf.d/hostname'
    def get_permanent_hostname(self):
        name = 'UNKNOWN'
        if not os.path.isfile(self.HOSTNAME_FILE):
            try:
                open(self.HOSTNAME_FILE, "a").write("hostname=temporarystub\n")
            except IOError as e:
                self.module.fail_json(msg="failed to write file: %s" %
                                          to_native(e), exception=traceback.format_exc())
        try:
            try:
                f = open(self.HOSTNAME_FILE, 'r')
                for line in f:
                    line = line.strip()
                    if line.startswith('hostname='):
                        name = line[10:].strip('"')
                        break
            except Exception as e:
                self.module.fail_json(msg="failed to read hostname: %s" %
                                          to_native(e), exception=traceback.format_exc())
        finally:
            f.close()
        return name
    def set_permanent_hostname(self, name):