Role service-yanic: use golang dep util
This commit is contained in:
parent
8670f113ff
commit
28ba57aa49
2 changed files with 16 additions and 1 deletions
|
@ -4,3 +4,4 @@ yanic_home: "/var/lib/yanic"
|
|||
yanic_path: "{{ gopath }}/bin/yanic"
|
||||
yanic_config: "/etc/yanic.conf"
|
||||
yanic_database: "yanic"
|
||||
yanic_src: "github.com/FreifunkBremen/yanic"
|
||||
|
|
|
@ -33,8 +33,22 @@
|
|||
dest: "/etc/systemd/system/yanic.service"
|
||||
notify: reload systemd
|
||||
|
||||
- name: create Yanic source directory
|
||||
file:
|
||||
path: "{{ gopath }}/src/{{ yanic_src }}"
|
||||
state: directory
|
||||
|
||||
- name: clone Yanic repository
|
||||
git:
|
||||
repo: "https://{{ yanic_src }}"
|
||||
dest: "{{ gopath }}/src/{{ yanic_src }}"
|
||||
force: true
|
||||
|
||||
- name: get required library versions
|
||||
shell: "cd {{ gopath }}/src/{{ yanic_src }} && GOPATH={{ gopath }} {{ gopath }}/bin/dep ensure"
|
||||
|
||||
- name: build Yanic binary
|
||||
shell: "GOPATH={{ gopath }} go get -v -u github.com/FreifunkBremen/yanic"
|
||||
shell: 'GOPATH={{ gopath }} go install {{ gopath }}/src/{{ yanic_src }}'
|
||||
notify: restart yanic
|
||||
|
||||
- name: configure Yanic systemd unit
|
||||
|
|
Loading…
Reference in a new issue