-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move Go-package-installing gubbins to a new role.
- Loading branch information
1 parent
a977159
commit fa515d6
Showing
8 changed files
with
73 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{# | ||
This file was written by Damien Dart, <[email protected]>. This is | ||
free and unencumbered software released into the public domain. For | ||
more information, please refer to the accompanying "UNLICENCE" file. | ||
#} | ||
{ | ||
"bin_dir": "/usr/local/go/bin" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# "golang_package" Ansible role variables. | ||
# | ||
# This file was written by Damien Dart, <[email protected]>. This is | ||
# free and unencumbered software released into the public domain. For | ||
# more information, please refer to the accompanying "UNLICENCE" file. | ||
|
||
--- | ||
golang_package__gopath: '/home/{{ golang_package__user }}/.go' | ||
|
||
golang_package__packages: [] | ||
|
||
golang_package__user: '{{ undef() }}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# This file was written by Damien Dart, <[email protected]>. This is | ||
# free and unencumbered software released into the public domain. For | ||
# more information, please refer to the accompanying "UNLICENCE" file. | ||
|
||
--- | ||
dependencies: | ||
- role: 'golang' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Compiles and installs Go packages using "go install". | ||
# | ||
# This file was written by Damien Dart, <[email protected]>. This is | ||
# free and unencumbered software released into the public domain. For | ||
# more information, please refer to the accompanying "UNLICENCE" file. | ||
|
||
--- | ||
- name: 'Ensure Go packages are compiled and installed for user "{{ golang_package__user }}"' | ||
ansible.builtin.command: '{{ ansible_local.golang.bin_dir }}/go install {{ item }}' | ||
become: true | ||
become_user: '{{ golang_package__user }}' | ||
environment: | ||
GOPATH: '{{ golang_package__gopath }}' | ||
register: __go_install | ||
changed_when: __go_install.stderr is search('downloading') | ||
loop: '{{ golang_package__packages }}' |