infra/roles/goploader/tasks/main.yml
2020-10-03 21:34:11 +02:00

37 lines
693 B
YAML

---
- name: ensure goploader user is present
user:
name: "goploader"
home: "/srv/goploader"
shell: "/bin/bash"
state: present
- name: Download Goploader
get_url:
url: https://gpldr.in/releases/servers/server_amd64.tar.gz
dest: /srv/goploader/server.tgz
become: true
become_user: goploader
- name: Unarchive goploader
unarchive:
src: /srv/goploader/server.tgz
remote_src: yes
dest: /srv/goploader
owner: goploader
group: goploader
- name: Template systemd service
template:
src: goploader.service
dest: /etc/systemd/system/goploader.service
owner: root
group: root
mode: 0644
notify:
- Restart goploader