10 lines
236 B
YAML
10 lines
236 B
YAML
- name: Set hostname
|
|
ansible.builtin.hostname:
|
|
name: "node-{{ groups['nodes'].index(inventory_hostname) + 1 }}"
|
|
|
|
- name: Set hosts
|
|
ansible.builtin.template:
|
|
src: networking/etc-hosts.j2
|
|
dest: /etc/hosts
|
|
mode: "0644"
|