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

72 lines
1.8 KiB
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 cheat
command: go get -u github.com/cheat/cheat/cmd/cheat
args:
creates: "{{ ansible_env.HOME }}/go/bin/cheat"
- name: install curlie
command: go get github.com/rs/curlie
args:
creates: "{{ ansible_env.HOME }}/go/bin/curlie"
- name: install judo
command: go get github.com/rollcat/judo
args:
creates: "{{ ansible_env.HOME }}/go/bin/judo"
- name: install duf FreeBSD
become: yes
become_user: root
become_method: sudo
when: ansible_facts['system']|lower == 'freebsd'
community.general.pkgng:
name: duf
state: present
- name: install duf Linux
when: ansible_facts['system']|lower == 'linux'
shell: curl -Lo duf.tar.gz https://github.com/muesli/duf/releases/download/v0.6.2/duf_0.6.2_linux_x86_64.tar.gz && tar xzf duf.tar.gz && install -m 755 duf ~/.local/bin/duf && rm -f duf.tar.gz duf README.md LICENSE
args:
warn: False
chdir: /tmp
creates: "{{ ansible_env.HOME }}/.local/bin/duf"
- name: install gron
shell: go get -u github.com/tomnomnom/gron
args:
creates: "{{ ansible_env.HOME }}/go/bin/gron"
- name: install shfmt
shell: GO111MODULE=on go get mvdan.cc/sh/v3/cmd/shfmt
args:
creates: "{{ ansible_env.HOME }}/go/bin/shfmt"
- name: install jiq
shell: go get github.com/fiatjaf/jiq/cmd/jiq
args:
creates: "{{ ansible_env.HOME }}/go/bin/jiq"