2017-06-11 20:26:34 +02:00
|
|
|
---
|
|
|
|
|
2018-07-17 12:37:33 +02:00
|
|
|
- name: Create user
|
2018-01-17 14:13:24 +01:00
|
|
|
user: name=yanic
|
2017-06-11 20:26:34 +02:00
|
|
|
|
|
|
|
- name: Install yanic
|
2018-07-26 10:57:58 +02:00
|
|
|
shell: /usr/local/go/bin/go get -v -u {{ yanic_source }}
|
2018-01-18 12:52:54 +01:00
|
|
|
args:
|
|
|
|
creates: /opt/go/bin/yanic
|
2017-06-11 20:26:34 +02:00
|
|
|
environment:
|
|
|
|
GOPATH: /opt/go
|
|
|
|
notify: Restart yanic
|
|
|
|
|
|
|
|
- name: Configure yanic
|
2017-11-09 21:44:38 +01:00
|
|
|
template: src=config.toml.j2 dest=/etc/yanic.conf
|
2017-06-11 20:26:34 +02:00
|
|
|
notify: Restart yanic
|
|
|
|
|
|
|
|
- name: Create directories
|
|
|
|
file: path={{ item }}/ state=directory owner=yanic
|
|
|
|
with_items:
|
2018-07-26 10:57:58 +02:00
|
|
|
- "{{ yanic_meshviewer_path }}"
|
|
|
|
- /var/lib/yanic
|
2017-06-11 20:26:34 +02:00
|
|
|
|
2018-02-28 14:23:53 +01:00
|
|
|
- name: Install systemd unit
|
2017-11-09 21:44:38 +01:00
|
|
|
copy: src=yanic.service dest=/lib/systemd/system/yanic.service
|
2017-06-11 20:26:34 +02:00
|
|
|
notify:
|
2018-07-26 10:57:58 +02:00
|
|
|
- Reload systemd
|
|
|
|
- Restart yanic
|
2017-06-11 20:26:34 +02:00
|
|
|
|
|
|
|
- name: Enable yanic
|
|
|
|
service: name=yanic enabled=yes
|