Set the hostname when localhost is found
This commit is contained in:
		| @@ -1,2 +1,8 @@ | |||||||
| --- | --- | ||||||
| # tasks file for ensure_hostname | # tasks file for ensure_hostname | ||||||
|  | - name: 'Set hostname if localhost' | ||||||
|  |   when: | ||||||
|  |     - ansible_system == 'Linux' | ||||||
|  |     - ansible_fqdn == 'localhost.localdomain' | ||||||
|  |   ansible.builtin.hostname: | ||||||
|  |     name: '{{ inventory_hostname }}' | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user