Ansible roles
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

11 lines
291 B

---
- 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'
...