2019-02-15 11:39:48 +01:00
|
|
|
---
|
|
|
|
- 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
|
2019-03-14 15:35:47 +01:00
|
|
|
shell: 'go get -u {{ cpthook_src }}'
|
|
|
|
environment:
|
|
|
|
GOPATH: "{{ gopath }}"
|
2019-02-15 11:39:48 +01:00
|
|
|
notify: restart cpthook
|
|
|
|
|
|
|
|
- name: configure cpthook systemd unit
|
|
|
|
systemd:
|
|
|
|
name: "cpthook.service"
|
|
|
|
enabled: yes
|
|
|
|
state: started
|