20 lines
364 B
YAML
20 lines
364 B
YAML
---
|
|
- name: update hosts file
|
|
ansible.builtin.template:
|
|
src: hosts.j2
|
|
dest: /etc/hosts
|
|
owner: root
|
|
group: root
|
|
mode: 0644
|
|
backup: yes
|
|
register: _hostname
|
|
|
|
- name: update hostname
|
|
ansible.builtin.template:
|
|
src: hostname.j2
|
|
dest: /etc/hostname
|
|
owner: root
|
|
group: root
|
|
mode: 0644
|
|
backup: yes
|
|
register: _hostname |