linux_ws2122_ansible/roles/hostname/tasks/main.yml
2021-12-11 22:46:32 +01:00

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