2017-06-11 20:26:34 +02:00
|
|
|
---
|
|
|
|
|
|
|
|
- name: Create users
|
|
|
|
user: name=yanic generate_ssh_key=yes ssh_key_type=rsa ssh_key_file=.ssh/id_rsa ssh_key_comment="yanic@{{inventory_hostname}}"
|
|
|
|
|
|
|
|
- name: Install yanic
|
|
|
|
shell: /usr/local/go/bin/go get -u github.com/FreifunkBremen/yanic/cmd/yanic
|
|
|
|
environment:
|
|
|
|
GOPATH: /opt/go
|
|
|
|
notify: Restart yanic
|
|
|
|
|
|
|
|
- name: Configure yanic
|
|
|
|
template: src=config.toml 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 system unit
|
|
|
|
template: src=yanic.service dest=/lib/systemd/system/yanic.service
|
|
|
|
notify:
|
|
|
|
- Reload systemd
|
|
|
|
- Restart yanic
|
|
|
|
|
|
|
|
- name: Enable yanic
|
|
|
|
service: name=yanic enabled=yes
|
|
|
|
|
|
|
|
- name: Install system publish unit
|
2017-06-30 11:59:14 +02:00
|
|
|
template: src={{ item }} dest=/lib/systemd/system/{{ item }}
|
2017-06-11 20:26:34 +02:00
|
|
|
when: yanic_publisher
|
|
|
|
with_items:
|
|
|
|
- yanic-publish.service
|
|
|
|
- yanic-publish.timer
|
|
|
|
notify:
|
|
|
|
- Reload systemd
|
|
|
|
- Restart yanic-publish
|
|
|
|
|
|
|
|
- name: Enable yanic-publish
|
|
|
|
service: name=yanic-publish.timer enabled=yes
|
|
|
|
when: yanic_publisher
|