aboutsummaryrefslogtreecommitdiff
path: root/ansible/roles
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2018-08-27 23:28:52 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2018-08-27 23:28:52 +0200
commit995ff0d77def7bffcd419ed8a6a87cf757bb7782 (patch)
tree55b60c5675b8ab6dc0fe7f4392cf5ee340c78bce /ansible/roles
parent8db1109ca093e057a0ac40aa6283030d536508ee (diff)
downloadinfra-995ff0d77def7bffcd419ed8a6a87cf757bb7782.tar.gz
infra-995ff0d77def7bffcd419ed8a6a87cf757bb7782.tar.bz2
infra-995ff0d77def7bffcd419ed8a6a87cf757bb7782.tar.xz
infra-995ff0d77def7bffcd419ed8a6a87cf757bb7782.zip
o Moving /etc/hosts configuration to lxc-machine.
Diffstat (limited to 'ansible/roles')
-rw-r--r--ansible/roles/lxc-machine/tasks/main.yml16
-rw-r--r--ansible/roles/mw-backend/tasks/main.yml17
2 files changed, 13 insertions, 20 deletions
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
diff --git a/ansible/roles/mw-backend/tasks/main.yml b/ansible/roles/mw-backend/tasks/main.yml
index 39fd44c..bbe7473 100644
--- a/ansible/roles/mw-backend/tasks/main.yml
+++ b/ansible/roles/mw-backend/tasks/main.yml
@@ -1,21 +1,4 @@
---
-- name: misc setup
- tags:
- - mw-backend
- - misc
- block:
- - name: /etc/hosts
- copy:
- dest: /etc/hosts
- content: |
- 127.0.0.1 localhost
- 127.0.1.1 mw.trygvis.io mw
-
- # The following lines are desirable for IPv6 capable hosts
- ::1 localhost ip6-localhost ip6-loopback
- ff02::1 ip6-allnodes
- ff02::2 ip6-allrouters
-
- name: apt setup
tags:
- mw-backend