better ansible args and change to release asset structure

main
Andrew Coleman 2021-09-08 00:06:34 -04:00
parent a593fd9f70
commit 2405b072a9
1 changed files with 3 additions and 2 deletions

View File

@ -70,8 +70,9 @@
dest: "{{ ansible_env.HOME }}/dev/k9s"
- name: build k9s-HEAD
ansible.builtin.shell: "cd ~/dev/k9s && gmake build && install -m 755 ./execs/k9s ~/.local/bin/k9s"
ansible.builtin.shell: "gmake build && install -m 755 ./execs/k9s ~/.local/bin/k9s"
args:
chdir: "{{ ansible_env.HOME }}/dev/k9s"
creates: "{{ ansible_env.HOME }}/.local/bin/k9s"
- name: install stern-HEAD freebsd
@ -82,7 +83,7 @@
- name: install newest stern linux
when: ansible_facts['system']|lower == 'linux'
shell: curl -Lo ~/.local/bin/stern $(curl -L https://api.github.com/repos/stern/stern/releases/latest | jq -r '.assets[] | select(.name == "stern_linux_amd64") | .browser_download_url') && chmod 755 ~/.local/bin/stern
shell: curl -Lo ~/.local/bin/stern $(curl -L https://api.github.com/repos/stern/stern/releases/latest | jq -r '.assets[] | select(.name | match("stern_.+_linux_amd64.tar.gz";"i")) | .browser_download_url') && chmod 755 ~/.local/bin/stern
args:
warn: False
creates: "{{ ansible_env.HOME }}/.local/bin/stern"