Rearange existing roles to make more sense

This commit is contained in:
Thomas Kleinendorst 2024-04-14 12:29:17 +02:00
parent bec00118c0
commit e06547e25c
11 changed files with 104 additions and 104 deletions

View file

@ -0,0 +1,11 @@
---
- 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: "{{ ansible_facts['default_ipv4']['address'] }} {{ hostname }}.kleinendorst.info {{ hostname }}"