---

- name: Set system hostname
  hostname: name={{ system_hostname | default(inventory_hostname | regex_replace('^([^\.]+)\..*','\\1')) }}

- name: Prevent PVE from changing /etc/hostname
  copy: content='' dest=/etc/.pve-ignore.hostname
  when: ansible_virtualization_type == 'lxc'

...

