Set the hostname when localhost is found
This commit is contained in:
parent
79b29a8297
commit
dccb12df73
@ -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 }}'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user