diff --git a/tasks/network.yml b/tasks/network.yml index f547298..f4e7844 100644 --- a/tasks/network.yml +++ b/tasks/network.yml @@ -64,6 +64,14 @@ state: started enabled: true +- name: copy /etc/hosts template + become: true + template: + src: 'hosts.j2' + dest: '/etc/hosts' + mode: '0644' + owner: root + - name: copy mobile configuration template: src: 'mobile.wireguard.j2' diff --git a/templates/hosts.j2 b/templates/hosts.j2 new file mode 100644 index 0000000..0210fda --- /dev/null +++ b/templates/hosts.j2 @@ -0,0 +1,10 @@ +# {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }} + +127.0.0.1 localhost +127.0.1.1 zeus +{{ lan_ip_address }} {{ domain_name }} + +# The following lines are desirable for IPv6 capable hosts +#::1 localhost ip6-localhost ip6-loopback +#ff02::1 ip6-allnodes +#ff02::2 ip6-allrouters