---
- name: Set hostname
  hostname:
    name: "{{ hostname__fqdn }}"
    use: systemd

- name: Configure /etc/hosts
  template:
    src: hosts.j2
    dest: /etc/hosts
    owner: root
    group: root
    mode: u=rw,g=r,o=r
...