Signed-off-by: Jeroen Oudshoorn <oudshoorn.jeroen@gmail.com>
This commit is contained in:
Jeroen Oudshoorn
2023-11-04 14:24:50 +01:00
parent dd422ef47f
commit f9f7a9fade
3 changed files with 48 additions and 71 deletions

View File

@ -1,36 +0,0 @@
#
# expects to be called with
#
# item = { name: 'resulting_binary', url: 'https://github.com/foo/bar.git' }
#
- name: Download and install golang
when: not big_golang.stat.exists
unarchive:
src: https://go.dev/dl/go1.21.1.linux-armv6l.tar.gz
dest: /usr/local
remote_src: yes
- name: Update .bashrc for go-1.21
blockinfile:
dest: /home/pi/.bashrc
state: present
block: |
export GOPATH=$HOME/go
export PATH=/usr/local/go/bin:$PATH:$GOPATH/bin
- name: 'download target {{ item.name }} from github'
git:
repo: "{{ item.url }}"
dest: '/usr/local/src/{{ item.name }}'
- name: install pwngrid 1.10.4
shell: "export GOPATH=$HOME/go && export PATH=/usr/local/go/bin:$PATH:$GOPATH/bin && go mod tidy && make && make install"
args:
executable: /bin/bash
chdir: /usr/local/src/pwngrid
- name: remove build folder
file:
state: absent
path: '/usr/local/src/{{ item.name }}'