This repository has been archived on 2021-09-08. You can view files and clone it, but cannot push or open issues/pull-requests.
localdev-playbooks/go.yml

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 == 'redhat'
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"