linux_ws2122_ansible/roles/hostname/tasks/main.yml

20 lines
364 B
YAML
Raw Permalink Normal View History

2021-12-11 21:46:32 +00:00
---
- 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