---
#Try and setup correct hostnames

- name: Set hostname to {{inventory_hostname}}
  ansible.builtin.hostname:
    name: "{{inventory_hostname}}"

- name: Template a file to /etc/file.conf
  ansible.builtin.template:
    src: hosts.j2
    dest: /etc/hosts
    owner: root
    group: root
    mode: '0644'
