This makes that we see better labels in Grafana and that we don't need to expose the address externally.
11 lines
337 B
YAML
11 lines
337 B
YAML
---
|
|
- name: Configure hostname
|
|
become: true
|
|
ansible.builtin.hostname:
|
|
name: "{{ hostname }}"
|
|
- name: Remove existing /etc/hosts entry for hostname and add FQDN name
|
|
become: true
|
|
ansible.builtin.lineinfile:
|
|
path: /etc/hosts
|
|
regexp: "^127.0.1.1.*$"
|
|
line: "127.0.0.1 {{ hostname }}.kleinendorst.info {{ hostname }}"
|