mirror of
https://github.com/jayofelony/pwnagotchi.git
synced 2025-07-01 18:37:27 -04:00
@ -4,61 +4,60 @@
|
|||||||
# item = { name: 'resulting_binary', url: 'https://github.com/foo/bar.git' }
|
# item = { name: 'resulting_binary', url: 'https://github.com/foo/bar.git' }
|
||||||
#
|
#
|
||||||
|
|
||||||
- name: Check for existance of Golang in /usr/local/go
|
- name: Check for existance of Golang in /usr/local/go
|
||||||
stat: path=/usr/local/go
|
stat: path=/usr/local/go
|
||||||
register: big_golang
|
register: big_golang
|
||||||
|
|
||||||
- name: Download and install golang
|
- name: Download and install golang
|
||||||
when: not big_golang.stat.exists
|
when: not big_golang.stat.exists
|
||||||
unarchive:
|
unarchive:
|
||||||
src: https://go.dev/dl/go1.21.1.linux-armv6l.tar.gz
|
src: https://go.dev/dl/go1.21.1.linux-armv6l.tar.gz
|
||||||
dest: /usr/local
|
dest: /usr/local
|
||||||
remote_src: yes
|
remote_src: yes
|
||||||
register: big_golang
|
register: big_golang
|
||||||
|
|
||||||
- name: 'download target {{ item.name }} from github'
|
- name: 'download target {{ item.name }} from github'
|
||||||
git:
|
git:
|
||||||
repo: "{{ item.url }}"
|
repo: "{{ item.url }}"
|
||||||
dest: '/usr/local/src/{{ item.name }}'
|
dest: '/usr/local/src/{{ item.name }}'
|
||||||
register: big_download
|
register: big_download
|
||||||
|
|
||||||
- name: go mod tidy
|
- name: go mod tidy
|
||||||
shell: "go mod tidy -x -v"
|
shell: "go mod tidy -x -v"
|
||||||
register: result
|
register: result
|
||||||
retries: 7
|
retries: 7
|
||||||
delay: 60
|
delay: 60
|
||||||
args:
|
args:
|
||||||
executable: /bin/bash
|
executable: /bin/bash
|
||||||
chdir: '/usr/local/src/{{ item.name }}'
|
chdir: '/usr/local/src/{{ item.name }}'
|
||||||
until: result is not failed
|
until: result is not failed
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
|
||||||
- name: build package
|
- name: build package
|
||||||
shell: "make"
|
shell: "make"
|
||||||
register: result
|
register: result
|
||||||
args:
|
args:
|
||||||
executable: /bin/bash
|
executable: /bin/bash
|
||||||
chdir: '/usr/local/src/{{ item.name }}'
|
chdir: '/usr/local/src/{{ item.name }}'
|
||||||
|
|
||||||
- name: install pwngrid 1.10.4
|
- name: install pwngrid 1.10.4
|
||||||
shell: "make install"
|
shell: "make install"
|
||||||
register: result
|
register: result
|
||||||
args:
|
args:
|
||||||
executable: /bin/bash
|
executable: /bin/bash
|
||||||
chdir: '/usr/local/src/{{ item.name }}'
|
chdir: '/usr/local/src/{{ item.name }}'
|
||||||
|
|
||||||
- name: make bin staging dir
|
- name: make bin staging dir
|
||||||
file:
|
file:
|
||||||
state: directory
|
state: directory
|
||||||
path: "/root/staging/bin"
|
path: "/root/staging/bin"
|
||||||
|
|
||||||
- name: copy built binary to staging directory
|
- name: copy built binary to staging directory
|
||||||
copy:
|
copy:
|
||||||
src: '/usr/local/bin/{{ item.name }}'
|
src: '/usr/local/bin/{{ item.name }}'
|
||||||
dest: "/root/staging/bin/"
|
dest: "/root/staging/bin/"
|
||||||
|
|
||||||
- name: remove build folder
|
|
||||||
file:
|
|
||||||
state: absent
|
|
||||||
path: '/usr/local/src/{{ item.name }}'
|
|
||||||
|
|
||||||
|
- name: remove build folder
|
||||||
|
file:
|
||||||
|
state: absent
|
||||||
|
path: '/usr/local/src/{{ item.name }}'
|
Reference in New Issue
Block a user