##### SUMMARY
On Fedora the systemd strategy is used, which is fine, but getting the current hostname uses the `hostname` command which may not always be present.

##### ISSUE TYPE
- Bug Report

##### COMPONENT NAME
hostname

##### ANSIBLE VERSION

```paste below
ansible 2.8.2
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/duck/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/duck/.local/lib/python3.7/site-packages/ansible
  executable location = /home/duck/.local/bin/ansible
  python version = 3.7.4 (default, Jul 11 2019, 10:43:21) [GCC 8.3.0]
```

##### CONFIGURATION

```paste below
ANSIBLE_FORCE_COLOR(env: ANSIBLE_FORCE_COLOR) = True
DEFAULT_VAULT_PASSWORD_FILE(env: ANSIBLE_VAULT_PASSWORD_FILE) = …
```

##### OS / ENVIRONMENT
The control node is using Debian unstable. I'm running molecule to run a test in Fedora 29.

##### STEPS TO REPRODUCE
The following is run on two test nodes, on Fedora 29 where it fails and one Centos & where it works fine.

```yaml
- name: Prepare hosts
  hosts: all
  tasks:
    - name: set proper hostname
      hostname:
        name: "{{ ansible_nodename }}.example.com"
```

##### EXPECTED RESULTS
The hostname should be set without error.

##### ACTUAL RESULTS
The systemd strategy uses hostnamectl to get and set the current and permanent hostnames except in `get_current_hostname()` where is uses `hostname` instead of `hostnamectl --transient status`. As in a container this command is not necessarily present, it fails with the following error:

```paste below
    The full traceback is:
      File "/tmp/ansible_hostname_payload_gb0hppku/ansible_hostname_payload.zip/ansible/module_utils/basic.py", line 1974, in get_bin_path
        bin_path = get_bin_path(arg, required, opt_dirs)
      File "/tmp/ansible_hostname_payload_gb0hppku/ansible_hostname_payload.zip/ansible/module_utils/common/process.py", line 41, in get_bin_path
        raise ValueError('Failed to find required executable %s in paths: %s' % (arg, os.pathsep.join(paths)))
    
    fatal: [ansible-test-builder]: FAILED! => {
        "changed": false,
        "invocation": {
            "module_args": {
                "name": "ansible-test-builder.example.com"
            }
        },
        "msg": "Failed to find required executable hostname in paths: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
    }
```

module = AnsibleModule(
        argument_spec=dict(
            name=dict(type='str', required=True),
            use=dict(type='str', choices=STRATS.keys())
        ),
        supports_check_mode=True,
    )
    hostname = Hostname(module)
    name = module.params['name']
    current_hostname = hostname.get_current_hostname()
    permanent_hostname = hostname.get_permanent_hostname()
    changed = hostname.update_current_and_permanent_hostname()
    if name != current_hostname:
        name_before = current_hostname
    elif name != permanent_hostname:
        name_before = permanent_hostname
    kw = dict(changed=changed, name=name,
              ansible_facts=dict(ansible_hostname=name.split('.')[0],
                                 ansible_nodename=name,
                                 ansible_fqdn=socket.getfqdn(),
                                 ansible_domain='.'.join(socket.getfqdn().split('.')[1:])))
    if changed:
        kw['diff'] = {'after': 'hostname = ' + name + '\n',
                      'before': 'hostname = ' + name_before + '\n'}
    module.exit_json(**kw)
if __name__ == '__main__':
    main()