summaryrefslogtreecommitdiff
path: root/chaos-at-home
diff options
context:
space:
mode:
Diffstat (limited to 'chaos-at-home')
-rw-r--r--chaos-at-home/r3-0x10.yml64
1 files changed, 64 insertions, 0 deletions
diff --git a/chaos-at-home/r3-0x10.yml b/chaos-at-home/r3-0x10.yml
index c5a03cc4..c613f373 100644
--- a/chaos-at-home/r3-0x10.yml
+++ b/chaos-at-home/r3-0x10.yml
@@ -7,3 +7,67 @@
- role: core/sshd/base
- role: core/zsh
- role: core/ntp
+
+- name: Payload Setup
+ hosts: r3-0x10
+ roles:
+ - role: nginx/base
+ - role: apt-repo/spreadspace
+ - role: x509/acmetool/base
+ post_tasks:
+ - name: install git and golang
+ apt:
+ name:
+ - git
+ - go
+ state: present
+
+ - name: checkout telme10 repo
+ git:
+ repo: 'https://github.com/realraum/telme10.git'
+ dest: /srv/telme10
+
+ - name: configure default vhost 0x10.r3.at
+ vars:
+ nginx_vhost:
+ default: yes
+ name: 0x10
+ template: generic
+ acme: yes
+ hostnames:
+ - 0x10.r3.at
+ - 0x10.realraum.at
+ locations:
+ '/':
+ root: /srv/telme10/web
+ index: index.html
+ include_role:
+ name: nginx/vhost
+
+ - name: create user for telme10
+ user:
+ name: telme10
+ home: /var/lib/telme10
+ system: yes
+
+ - name: build telme10
+ command: go build -tags netgo
+ args:
+ chdir: /srv/telme10
+ creates: /srv/telme10/telme10
+
+ - name: install systemd service units
+ loop:
+ - socket
+ - service
+ copy:
+ src: "/srv/telme10/telme10.{{ item }}"
+ remote_src: yes
+ dest: "/etc/systemd/system/telme10.{{ item }}"
+
+ - name: make sure the systemd socket unit is enabled and started
+ systemd:
+ daemon_reload: yes
+ name: telme10.socket
+ enabled: yes
+ state: started