35 lines
762 B
YAML
35 lines
762 B
YAML
|
---
|
||
|
- name: install go freebsd
|
||
|
become: yes
|
||
|
become_user: root
|
||
|
become_method: sudo
|
||
|
when: ansible_facts['system']|lower == 'freebsd'
|
||
|
community.general.pkgng:
|
||
|
name: go
|
||
|
state: present
|
||
|
|
||
|
- name: install golang fedora
|
||
|
become: yes
|
||
|
become_user: root
|
||
|
become_method: sudo
|
||
|
when: ansible_facts['os_family']|lower == 'fedora'
|
||
|
dnf:
|
||
|
name: golang
|
||
|
state: present
|
||
|
|
||
|
- name: configure GOPATH / GOBIN
|
||
|
file:
|
||
|
state: directory
|
||
|
path: "{{ ansible_env.HOME }}/go/bin"
|
||
|
mode: "0700"
|
||
|
|
||
|
- name: install judo
|
||
|
command: go get github.com/rollcat/judo
|
||
|
args:
|
||
|
creates: "{{ ansible_env.HOME }}/go/bin/judo"
|
||
|
|
||
|
- name: install shfmt
|
||
|
shell: GO111MODULE=on go get mvdan.cc/sh/v3/cmd/shfmt
|
||
|
args:
|
||
|
creates: "{{ ansible_env.HOME }}/go/bin/shfmt"
|