diff options
author | Christian Pointner <equinox@spreadspace.org> | 2023-01-28 03:04:58 +0100 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2023-01-28 03:04:58 +0100 |
commit | 9c2ee3f642cb8b7ca5074f1fdbdc109a74a3b086 (patch) | |
tree | 18fa7f94771c3857304f6d7770a57452e60ac7ec | |
parent | add r3-0x10 (diff) |
r3-0x10: payload setup
-rw-r--r-- | chaos-at-home/r3-0x10.yml | 64 | ||||
-rw-r--r-- | inventory/host_vars/r3-0x10.yml | 4 |
2 files changed, 68 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 diff --git a/inventory/host_vars/r3-0x10.yml b/inventory/host_vars/r3-0x10.yml index e1520247..f17d1bf0 100644 --- a/inventory/host_vars/r3-0x10.yml +++ b/inventory/host_vars/r3-0x10.yml @@ -30,3 +30,7 @@ network: overlay: "{{ (vm_host.network.bridges.public.overlays.default.prefix | ansible.utils.ipaddr(vm_host.network.bridges.public.overlays.default.offsets[inventory_hostname])).split('/')[0] }}" interfaces: - *_network_primary_ + + +acme_account_email: equinox@r3.at +acme_directory_server: "{{ acme_directory_server_le_live_v2 }}" |