ansible/roles/yanic/tasks/main.yml
2018-07-17 12:37:33 +02:00

32 lines
683 B
YAML

---
- name: Create user
user: name=yanic
- name: Install yanic
shell: /usr/local/go/bin/go get -v -u github.com/ffrgb/yanic
args:
creates: /opt/go/bin/yanic
environment:
GOPATH: /opt/go
notify: Restart yanic
- name: Configure yanic
template: src=config.toml.j2 dest=/etc/yanic.conf
notify: Restart yanic
- name: Create directories
file: path={{ item }}/ state=directory owner=yanic
with_items:
- "{{ yanic_meshviewer_path }}"
- /var/lib/yanic
- name: Install systemd unit
copy: src=yanic.service dest=/lib/systemd/system/yanic.service
notify:
- Reload systemd
- Restart yanic
- name: Enable yanic
service: name=yanic enabled=yes