mirror of
https://github.com/jayofelony/pwnagotchi.git
synced 2025-07-01 18:37:27 -04:00
edit ansible build
Signed-off-by: Jeroen Oudshoorn <oudshoorn.jeroen@gmail.com>
This commit is contained in:
@ -15,9 +15,17 @@
|
|||||||
"type": "shell",
|
"type": "shell",
|
||||||
"inline": [
|
"inline": [
|
||||||
"uname -a",
|
"uname -a",
|
||||||
"dpkg-architecture"
|
"dpkg-architecture",
|
||||||
|
"mkdir -p /usr/local/src/pwnagotchi"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "file",
|
||||||
|
"sources": [
|
||||||
|
"../dist/pwnagotchi-{{user `pwn_version`}}.tar.gz"
|
||||||
|
],
|
||||||
|
"destination": "/usr/local/src/pwnagotchi/"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "file",
|
"type": "file",
|
||||||
"source": "../builder/data/usr/bin/pwnlib",
|
"source": "../builder/data/usr/bin/pwnlib",
|
||||||
|
@ -347,50 +347,10 @@
|
|||||||
path: /usr/local/share/pwnagotchi/custom-plugins/
|
path: /usr/local/share/pwnagotchi/custom-plugins/
|
||||||
state: directory
|
state: directory
|
||||||
|
|
||||||
- name: collect python pip package list
|
- name: Install pwnagotchi from source archive
|
||||||
command: "pip3 list"
|
|
||||||
register: pip_output
|
|
||||||
|
|
||||||
- name: set python pip package facts
|
|
||||||
set_fact:
|
|
||||||
pip_packages: >
|
|
||||||
{{ pip_packages | default({}) | combine( { item.split()[0]: item.split()[1] } ) }}
|
|
||||||
with_items: "{{ pip_output.stdout_lines }}"
|
|
||||||
|
|
||||||
- name: acquire python3 pip target
|
|
||||||
command: "python3 -c 'import sys;print(sys.path.pop())'"
|
|
||||||
register: pip_target
|
|
||||||
|
|
||||||
- name: clone pwnagotchi repository
|
|
||||||
git:
|
|
||||||
repo: https://github.com/jayofelony/pwnagotchi.git
|
|
||||||
dest: /usr/local/src/pwnagotchi
|
|
||||||
register: pwnagotchigit
|
|
||||||
|
|
||||||
- name: create /usr/local/share/pwnagotchi/ folder
|
|
||||||
file:
|
|
||||||
path: /usr/local/share/pwnagotchi/
|
|
||||||
state: directory
|
|
||||||
|
|
||||||
- name: fetch pwnagotchi version
|
|
||||||
set_fact:
|
|
||||||
pwnagotchi_version: "{{ lookup('file', '/usr/local/src/pwnagotchi/pwnagotchi/_version.py') | regex_replace('.*__version__.*=.*''([0-9]+\\.[0-9]+\\.[0-9]+[A-Za-z0-9]*)''.*', '\\1') }}"
|
|
||||||
|
|
||||||
- name: pwnagotchi version found
|
|
||||||
debug:
|
|
||||||
msg: "{{ pwnagotchi_version }}"
|
|
||||||
|
|
||||||
- name: build pwnagotchi wheel
|
|
||||||
command: "python3 setup.py sdist bdist_wheel"
|
|
||||||
args:
|
|
||||||
chdir: /usr/local/src/pwnagotchi
|
|
||||||
when: (pwnagotchigit.changed) or (pip_packages['pwnagotchi'] is undefined) or (pip_packages['pwnagotchi'] != pwnagotchi_version)
|
|
||||||
|
|
||||||
- name: install pwnagotchi wheel and dependencies
|
|
||||||
pip:
|
pip:
|
||||||
name: "{{ lookup('fileglob', '/usr/local/src/pwnagotchi/dist/pwnagotchi*.whl') }}"
|
name: /usr/local/src/pwnagotchi/pwnagotchi-{{ pwnagotchi.version }}.tar.gz
|
||||||
extra_args: "--no-cache-dir"
|
extra_args: --verbose --prefer-binary --ignore-installed
|
||||||
when: (pwnagotchigit.changed) or (pip_packages['pwnagotchi'] is undefined) or (pip_packages['pwnagotchi'] != pwnagotchi_version)
|
|
||||||
|
|
||||||
# Install go-1.20.6
|
# Install go-1.20.6
|
||||||
- name: Install go-1.21
|
- name: Install go-1.21
|
||||||
|
Reference in New Issue
Block a user