![Learning Ansible 2.7(Third Edition)](https://wfqqreader-1252317822.image.myqcloud.com/cover/670/36698670/b_36698670.jpg)
上QQ阅读APP看书,第一时间看更新
Changing the hostname
To keep things simple, I find it useful to set the hostname of a machine to something meaningful. To do so, we can use a very simple Ansible module called hostname:
- name: Ensure the hostname is the same of the inventory hostname: name: "{{ inventory_hostname }}" become: True