This role is designed to build and deploy go binaries.
go_build_required_packages:
- github.com/elazarl/go-bindata-assetfs/...
- github.com/jteeuwen/go-bindata/...
- github.com/GeertJohan/go.rice
- github.com/GeertJohan/go.rice/rice
If repository has multiple project directories inside they can be defined with go_build_subprojects
variable.
go_deploy_notify
accepts list of handlers.
Checkout vars, more could be added.
Role builds binaries only once for hosts in play so it may be a problem if they are of different architectures.
- hosts: pi
become: yes
roles:
- role: go-deploy
go_build_repo: github.com/inCaller/prometheus_bot
go_deploy_notify:
- prometheus_bot reload
Note that service is defined outside this role.