Manage go packages with go command.
https://galaxy.ansible.com/suzuki-shunsuke/go-module/
- This module supports only the "go get" command.
- This module doesn't support the check mode.
- If this module succeeds, the result's changed attribute is always true.
- Go
This module is distributed in the Ansible Galaxy.
So you can install this with ansible-galaxy
command.
$ ansible-galaxy install suzuki-shunsuke.go-module
# playbook.yml
- hosts: default
roles:
# After you call this role, you can use this module.
- suzuki-shunsuke.go-module
parameter | required | default | choices | comments |
---|---|---|---|---|
name | yes | The name of go package to install | ||
executable | no | The executable path of go command | ||
install | no | yes | bool | If no, the -d option is added to "go get" command |
update | no | no | bool | If yes, the -u option is added to "go get" command |
command | no | get | get | The subcommand of "go" command. Now support only "get" |
# Install hub
go:
name: github.com/github/hub
# Specify the path of go command
go:
name: github.com/github/hub
executable: /usr/local/go/bin/go
# Not install
go:
name: github.com/github/hub
install: no
# Update
go:
name: github.com/github/hub
update: yes
MIT
- Vagrant
- Ansible
$ cd tests
$ ansible-galaxy install -r roles.yml
$ cd tests
$ vagrant up --provision-with=ansible
$ vagrant up --provision-with=ansible_local
$ ansible-playbook test.yml