Bind hostname to 172.0.1.1 and use FQDN in config

This makes that we see better labels in Grafana and that we don't
need to expose the address externally.
This commit is contained in:
Thomas Kleinendorst 2024-09-23 12:23:05 +02:00
parent 3c0b5ebdab
commit 71499b2610
3 changed files with 21 additions and 6 deletions

View file

@ -8,4 +8,4 @@
ansible.builtin.lineinfile:
path: /etc/hosts
regexp: "^127.0.1.1.*$"
line: "{{ ansible_facts['default_ipv4']['address'] }} {{ hostname }}.kleinendorst.info {{ hostname }}"
line: "127.0.0.1 {{ hostname }}.kleinendorst.info {{ hostname }}"