From 995ff0d77def7bffcd419ed8a6a87cf757bb7782 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Mon, 27 Aug 2018 23:28:52 +0200 Subject: o Moving /etc/hosts configuration to lxc-machine. --- ansible/roles/lxc-machine/tasks/main.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'ansible/roles/lxc-machine/tasks') diff --git a/ansible/roles/lxc-machine/tasks/main.yml b/ansible/roles/lxc-machine/tasks/main.yml index 626428c..b4f4aee 100644 --- a/ansible/roles/lxc-machine/tasks/main.yml +++ b/ansible/roles/lxc-machine/tasks/main.yml @@ -1,5 +1,3 @@ ---- - - name: system setup tags: - packages @@ -22,4 +20,16 @@ content: net.ipv6.conf.all.disable_ipv6=1 notify: restart sysctl -# TODO: unattended upgrades, postfix client +- name: /etc/hosts + copy: + dest: /etc/hosts + content: | + 127.0.0.1 localhost + 127.0.1.1 {{ ansible_ssh_extra_args }}.trygvis.io {{ ansible_ssh_extra_args }} + + # The following lines are desirable for IPv6 capable hosts + ::1 localhost ip6-localhost ip6-loopback + ff02::1 ip6-allnodes + ff02::2 ip6-allrouters + +# TODO: postfix client -- cgit v1.2.3