dotfiles-ansible/roles/packages/tasks/go-packages.yml

373 lines
11 KiB
YAML

---
# Avoid fzf.vim from distro repo
- name: packages | Install fzf
tags: fzf
command:
cmd: /usr/bin/go install -ldflags '-s -w' github.com/junegunn/fzf@latest
removes: /usr/bin/go
- name: packages | Install grpcurl
tags: grpcurl
command:
cmd: /usr/bin/go install -ldflags '-s -w' github.com/fullstorydev/grpcurl/cmd/grpcurl@latest
removes: /usr/bin/go
- name: packages | Install tpmk
tags: tpmk
command:
cmd: /usr/bin/go install -ldflags '-s -w' github.com/folbricht/tpmk/cmd/tpmk@latest
removes: /usr/bin/go
- name: packages | Install dockle
tags: dockle
command:
cmd: /usr/bin/go install -ldflags '-s -w' github.com/goodwithtech/dockle/cmd/dockle@latest
removes: /usr/bin/go
- name: packages | Install yaegi
tags: yaegi
command:
cmd: /usr/bin/go install -ldflags '-s -w' github.com/traefik/yaegi/cmd/yaegi@latest
removes: /usr/bin/go
- name: packages | Install vale
tags: vale
command:
cmd: /usr/bin/go install -ldflags '-s -w' github.com/errata-ai/vale/v2/cmd/vale@latest
removes: /usr/bin/go
- name: packages | Install kroki-cli
tags: kroki
command:
cmd: /usr/bin/go install -ldflags '-s -w' github.com/yuzutech/kroki-cli/cmd/kroki@latest
removes: /usr/bin/go
- name: packages | Install qbittorrent-cli
tags: qbittorrent-cli
command:
cmd: /usr/bin/go install -ldflags '-s -w' github.com/ludviglundgren/qbittorrent-cli/cmd/qbt@latest
removes: /usr/bin/go
- name: packages | Install gophie
tags: gophie
command:
cmd: /usr/bin/go install -ldflags '-s -w' github.com/go-phie/gophie@latest
removes: /usr/bin/go
- name: packages | Install koneko
tags: koneko
command:
cmd: /usr/bin/go install -ldflags '-s -w' github.com/irevenko/koneko@latest
removes: /usr/bin/go
- name: packages | Install what-anime-cli
tags: what-anime-cli
command:
cmd: go install -ldflags '-s -w' github.com/irevenko/what-anime-cli@latest
removes: /usr/bin/go
- name: packages | Install wiki
tags: wiki
command:
cmd: /usr/bin/go install -ldflags '-s -w' github.com/betapictoris/wiki@latest
removes: /usr/bin/go
- name: packages | Install lux
tags: lux
command:
cmd: go install -ldflags '-s -w' github.com/iawia002/lux@latest
removes: /usr/bin/go
- name: packages | Install muffet
tags: muffet
command:
cmd: go install -ldflags '-s -w' github.com/raviqqe/muffet/v2@latest
removes: /usr/bin/go
- name: packages | Install buf
tags: buf
command:
cmd: /usr/bin/go install -ldflags '-s -w' github.com/bufbuild/buf/cmd/buf@latest
removes: /usr/bin/go
- name: packages | Install primitive
tags: primitive
command:
cmd: /usr/bin/go install -ldflags '-s -w' github.com/fogleman/primitive@latest
removes: /usr/bin/go
- name: packages | Install guerrilla
tags: guerrilla
command:
cmd: /usr/bin/go install -ldflags '-s -w' github.com/liamg/guerrilla/cmd/guerrilla@latest
removes: /usr/bin/go
- name: packages | Install vim-startuptime
tags: vim
command:
cmd: /usr/bin/go install -ldflags '-s -w' github.com/rhysd/vim-startuptime@latest
removes: /usr/bin/go
- name: packages | Install cshatag
tags: cshatag
command:
cmd: /usr/bin/go install -ldflags '-s -w' github.com/rfjakob/cshatag@latest
removes: /usr/bin/go
- name: packages | Install gokey
tags: gokey
command:
cmd: /usr/bin/go install -ldflags '-s -w' github.com/cloudflare/gokey/cmd/gokey@latest
removes: /usr/bin/go
- name: packages | Install JSON diff patching tool
tags: jd
command:
cmd: /usr/bin/go install -ldflags '-s -w' github.com/josephburnett/jd@latest
removes: /usr/bin/go
- name: packages | Install gmailctl
tags: gmailctl
command:
cmd: /usr/bin/go install -ldflags '-s -w' github.com/mbrt/gmailctl/cmd/gmailctl@latest
removes: /usr/bin/go
- name: packages | Install hcl2json
tags: hcl2json
command:
cmd: /usr/bin/go install -ldflags '-s -w' github.com/tmccombs/hcl2json@latest
removes: /usr/bin/go
- name: packages | Install opcr-io/policy
tags: opa-policy
command:
cmd: /usr/bin/go install -ldflags '-s -w' github.com/opcr-io/policy/cmd/policy@latest
removes: /usr/bin/go
- name: packages | Install oras-cli
tags: oras
command:
cmd: /usr/bin/go install -ldflags '-s -w' oras.land/oras/cmd/oras@latest
removes: /usr/bin/go
# Works nicely with ytt
- name: packages | Install kapp
tags: kapp
command:
cmd: /usr/bin/go install -ldflags '-s -w' github.com/vmware-tanzu/carvel-kapp/cmd/kapp@latest
removes: /usr/bin/go
- name: packages | Install kluctl
tags: kluctl
command:
cmd: /usr/bin/go install -ldflags '-s -w' github.com/kluctl/kluctl/v2@latest
removes: /usr/bin/go
- name: packages | Install kubesec
tags: kubesec
command:
cmd: /usr/bin/go install -ldflags '-s -w' github.com/controlplaneio/kubesec/v2@latest
removes: /usr/bin/go
- name: packages | Install kubeconform
tags: kubeconform
command:
cmd: /usr/bin/go install -ldflags '-s -w' github.com/yannh/kubeconform/cmd/kubeconform@latest
removes: /usr/bin/go
- name: packages | Install scatman
tags: scatman
command:
cmd: /usr/bin/go install -ldflags '-s -w' github.com/89luca89/scatman@latest
removes: /usr/bin/go
- name: packages | Install dblab
tags: dblab
command:
cmd: /usr/bin/go install -ldflags '-s -w' github.com/danvergara/dblab@latest
removes: /usr/bin/go
- name: packages | Install Grafana's dashboard-linter
command:
cmd: /usr/bin/go install -ldflags '-s -w' github.com/grafana/dashboard-linter@latest
removes: /usr/bin/go
tags: dashboard-linter
- name: packages | Install oauth2l
command:
cmd: /usr/bin/go install -ldflags '-s -w' github.com/google/oauth2l@latest
removes: /usr/bin/go
tags: oauth2l
- name: packages | Install oauth2c
command:
cmd: /usr/bin/go install -ldflags '-s -w' github.com/cloudentity/oauth2c@latest
removes: /usr/bin/go
tags: oauth2c
- name: packages | Install d2
command:
cmd: /usr/bin/go install -ldflags '-s -w' oss.terrastruct.com/d2@latest
removes: /usr/bin/go
tags: d2
# Doesn't seem to work properly
- name: packages | Install footloose
tags: footloose
command:
cmd: /usr/bin/go install -ldflags '-s -w' github.com/weaveworks/footloose@latest
removes: /usr/bin/go
- name: packages | Install terramate
tags: terramate
command:
cmd: /usr/bin/go install -ldflags '-s -w' github.com/mineiros-io/terramate/cmd/terramate@latest
removes: /usr/bin/go
- name: packages | Install tflint suites
tags: tflint
block:
- name: packages | Install tflint and some cloud ruleset plugins
tags: tflint
command:
cmd: /usr/bin/go install -ldflags '-s -w' github.com/{{ item }}@latest
removes: /usr/bin/go
loop:
- terraform-linters/tflint
- terraform-linters/tflint-ruleset-google
- terraform-linters/tflint-ruleset-azurerm
- terraform-linters/tflint-ruleset-aws
- awslabs/serverless-rules/tflint-ruleset-aws-serverless
- name: tflint | Create tflint plugins directory
file:
path: ~/.tflint.d/plugins
state: directory
mode: 0755
- name: tflint | Copy tflint GCP ruleset binary to plugins directory
command: /bin/mv {{ ansible_env.GOPATH }}/bin/{{ item }} ~/.tflint.d/plugins/
args:
creates: '~/.tflint.d/plugins/{{ item }}'
removes: '{{ ansible_env.GOPATH }}/bin/{{ item }}'
loop:
- tflint-ruleset-google
- tflint-ruleset-azurerm
- tflint-ruleset-aws
- tflint-ruleset-aws-serverless
# NOTE: Clair server is required
# - Install with 'go install github.com/quay/clair/v4/cmd/clair@latest' or use docker image
# - Clair server requires a PostgreSQL instance
# Default open on localhost:6060
- name: packages | Install clairctl
tags: clair
command:
cmd: /usr/bin/go install -ldflags '-s -w' github.com/quay/clair/v4/cmd/clairctl@latest
removes: /usr/bin/go
- name: packages | Instal kubectl-trace
tags: kubectl-trace
command:
cmd: /usr/bin/go install -ldflags '-s -w' github.com/iovisor/kubectl-trace/cmd/kubectl-trace@latest
removes: /usr/bin/go
- name: packages | Install rakkess
tags: rakkess
command:
cmd: /usr/bin/go install -ldflags '-s -w' github.com/corneliusweig/rakkess@latest
removes: /usr/bin/go
- name: packages | Install ketall
tags: ketall
command:
cmd: /usr/bin/go install -ldflags '-s -w' github.com/corneliusweig/ketall@latest
removes: /usr/bin/go
# Stupid Elastic v2 license
- name: packages | Install infra
block:
- name: packages | Clone infra repository
git:
repo: https://github.com/infrahq/infra.git
dest: '{{ infrahq_dir }}'
depth: 1
- name: packages | Compile and install infra
command:
cmd: /usr/bin/go build -ldflags '-s -w' -o ~/.local/bin/infra .
removes: /usr/bin/go
chdir: '{{ infrahq_dir }}'
- name: packages | Remove infrahq repository (installation done)
file:
path: '{{ infrahq_dir }}'
state: absent
tags: infrahq
- name: packages | Install kubevirt CLI client
block:
- name: packages | Clone kubevirt repository
git:
repo: https://github.com/kubevirt/kubevirt.git
dest: '{{ kubevirt_dir }}'
depth: 1
- name: packages | Compile and install kubevirt CLI client
command:
cmd: /usr/bin/go build -ldflags '-s -w' -o ~/.local/bin/virtctl ./cmd/virtctl
removes: /usr/bin/go
chdir: '{{ kubevirt_dir }}'
- name: packages | Remove kubevirt repository (installation done)
file:
path: '{{ kubevirt_dir }}'
state: absent
tags: kubevirt
- name: packages | Install tf-controller CLI
block:
- name: packages | Clone tf-controller repository
git:
repo: https://github.com/weaveworks/tf-controller.git
dest: '{{ tf_controller_dir }}'
depth: 1
- name: packages | Compile and install tf-controller CLI
command:
cmd: /usr/bin/go build -ldflags '-s -w' -o ~/.local/bin/tfctl ./cmd/tfctl
removes: /usr/bin/go
chdir: '{{ tf_controller_dir }}'
- name: packages | Remove tf-controller repository (installation done)
file:
path: '{{ tf_controller_dir }}'
state: absent
tags: tf-controller
- name: packages | Install kubestr
tags: kubestr
block:
- name: packages | Clone kubestr repository
git:
repo: https://github.com/kastenhq/kubestr.git
dest: '{{ kubestr_dir }}'
depth: 1
- name: packages | Compile ans install kubestr
command:
cmd: /usr/bin/go build -ldflags '-s -w' -o ~/.local/bin/kubestr .
removes: /usr/bin/go
chdir: '{{ kubestr_dir }}'
- name: packages | Remove kubestr repository (installation done)
file:
path: '{{ kubestr_dir }}'
state: absent
- name: packages | Clean go cache
command:
cmd: /usr/bin/go clean -modcache -cache -fuzzcache
removes: /usr/bin/go
tags: goclean