ansible-ffibk/roles/service-cpthook/tasks/main.yml

24 lines
538 B
YAML

---
- name: write cpthook config
template:
src: "cpthook.yml.j2"
dest: "{{ cpthook_config }}"
notify: restart cpthook
- name: create systemd unit for cpthook
template:
src: "cpthook.service.j2"
dest: "/etc/systemd/system/cpthook.service"
notify: reload systemd
- name: build cpthook binary
shell: 'go get -u {{ cpthook_src }}'
environment:
GOPATH: "{{ gopath }}"
notify: restart cpthook
- name: configure cpthook systemd unit
systemd:
name: "cpthook.service"
enabled: yes
state: started