ansible-ffibk/roles/service-yanic/tasks/main.yml
Julian Labus b35c731813
Role service-yanic: switch to own fork
Should be reverted after the respondd branch is merged
2019-05-04 17:55:23 +02:00

35 lines
805 B
YAML

---
- name: create system user
user:
name: "{{ yanic_user }}"
home: "{{ yanic_home }}"
shell: /bin/false
- name: create source directory
file:
path: "{{ gopath }}/src/{{ yanic_dst }}"
state: directory
- name: clone repository
git:
repo: "https://{{ yanic_src }}"
dest: "{{ gopath }}/src/{{ yanic_dst }}"
version: "{{ yanic_version }}"
force: true
- name: ensure dependencies
shell: "cd {{ gopath }}/src/{{ yanic_dst }} && {{ gopath }}/bin/dep ensure"
environment:
GOPATH: "{{ gopath }}"
- name: build binary
shell: 'go install {{ gopath }}/src/{{ yanic_dst }}'
environment:
GOPATH: "{{ gopath }}"
- name: configure yanic
include_tasks: yanic.yml
when: server_type == "monitoring"
- name: configure respondd
include_tasks: respondd.yml