aboutsummaryrefslogtreecommitdiffstats
path: root/roles/mail1/tasks
diff options
context:
space:
mode:
authorEmil Renner Berthing <esmil@labitat.dk>2019-10-08 20:33:44 +0200
committerEmil Renner Berthing <esmil@labitat.dk>2019-10-08 20:34:31 +0200
commit8ebf2d6db3067650191ab96f9d1d2b9c1599d580 (patch)
treedfb1e76b66a08ff94d02e7e15f516336d426f084 /roles/mail1/tasks
parent32b8d0e6b71f47ad763db5b71e160337a05939b2 (diff)
downloadlabitat-ansible-8ebf2d6db3067650191ab96f9d1d2b9c1599d580.tar.gz
labitat-ansible-8ebf2d6db3067650191ab96f9d1d2b9c1599d580.tar.xz
labitat-ansible-8ebf2d6db3067650191ab96f9d1d2b9c1599d580.zip
mail1: add role to set up new mailserver
This is just the base OS for now. Let's hope someone who knows more about mail wants to continue..
Diffstat (limited to 'roles/mail1/tasks')
-rw-r--r--roles/mail1/tasks/haveged.yml12
-rw-r--r--roles/mail1/tasks/main.yml24
2 files changed, 36 insertions, 0 deletions
diff --git a/roles/mail1/tasks/haveged.yml b/roles/mail1/tasks/haveged.yml
new file mode 100644
index 0000000..2b2cb65
--- /dev/null
+++ b/roles/mail1/tasks/haveged.yml
@@ -0,0 +1,12 @@
+---
+- name: Enable haveged service
+ systemd:
+ name: 'haveged.service'
+ enabled: yes
+ masked: no
+ state: started
+ when: not chroot
+- name: '- when in chroot'
+ command: 'systemctl enable haveged.service'
+
+# vim: set ts=2 sw=2 et:
diff --git a/roles/mail1/tasks/main.yml b/roles/mail1/tasks/main.yml
new file mode 100644
index 0000000..c66a6f8
--- /dev/null
+++ b/roles/mail1/tasks/main.yml
@@ -0,0 +1,24 @@
+---
+- name: Install network configuration
+ copy:
+ dest: '/etc/systemd/network/10-ens3.network'
+ src: ens3.network
+ owner: root
+ group: root
+ mode: 0644
+ tags:
+ - networkd-config
+
+- name: Disable unused services
+ systemd:
+ name: '{{ item }}'
+ enabled: no
+ with_items:
+ - remote-fs.target
+ tags:
+ - systemd
+
+- import_tasks: haveged.yml
+ tags: haveged
+
+# vim: set ts=2 sw=2 et: