10 lines
265 B
YAML
10 lines
265 B
YAML
---
|
|
- name: "Hostname | Set hostname"
|
|
ansible.builtin.hostname:
|
|
name: "{{ inventory_hostname }}"
|
|
use: systemd
|
|
|
|
- name: "Hostname | Set hostname in /etc/hosts"
|
|
ansible.builtin.lineinfile:
|
|
path: /etc/hosts
|
|
line: '127.0.0.1 {{ ansible_hostname }}'
|