ansible/roles/hostname/tasks/main.yml

15 lines
227 B
YAML
Raw Normal View History

2023-04-05 00:18:41 +02:00
---
- name: Set hostname
hostname:
name: "{{ hostname__fqdn }}"
use: systemd
- name: Configure /etc/hosts
template:
src: hosts.j2
dest: /etc/hosts
owner: root
group: root
mode: u=rw,g=r,o=r
...