The Golang ansible role allows you to install a specific Go version (only linux OS is supported at the moment) including setting up an example hello world Go web application as a systemd
service.
- For Windows, you could simply install go using
choco install golang
- For MacOS, you could simply install go using
brew install go
Adjust the example.inventory.ini
file according to your target host and SSH credentials then rename the file to inventory.ini
ansible-playbook testapp.yml -i inventory.ini
You could test whether the example hello world Go web application has been running successfully using the following commands on the target machine defined in the inventory file:
systemctl status hello-world
curl localhost:8080