Ansible role to install or uninstall Ghidra - a software reverse engineering (SRE) framework
ghidra
Installs Ghidra - a software reverse engineering
(SRE) framework. Extracts a single icon from the release, creates XDG desktop
file to launch the application in GUI mode.
desktop-file-utils
installed or role installs this from configuredAll variables which can be overridden are stored in
defaults/main.yml file and listed in a table bellow as
well.
Name | Default Value | Description |
---|---|---|
ghidra_archive_src |
“” | Path to an release archive of Ghidra on a control host or URL to download the archive from. |
ghidra_state |
present | By default installs the program. Set to “absent” to uninstall. |
ghidra_top_dest_name_override |
Ghidra | Base name of installation directory and name part of a desktop file. If set to empty, top level of release archive is used instead. |
ghidra_install_parent_dir |
/opt | Parent directory in which program will be installed. See also ghidra_top_dest_name_override . |
ghidra_desktop_parent_dir |
/usr/local/share/applications | Parent directory in which desktop file will be installed. See also ghidra_top_dest_name_override . |
ghidra_force_remove |
no | If set to “yes”, contents of installation directory and desktop file are not compared against contents of ghidra_archive_src when uninstall, upgrade or downgrade. |
ghidra_archive_src
must be overriden from its defaults. For URL to a latest
release see Ghidra home page.
To install the program, define URL to download Ghidra release archive from the
internet:
- hosts: all
roles:
- role: scrool.ghidra
vars:
ghidra_archive_src: https://ghidra-sre.org/ghidra_9.1.2_PUBLIC_20200212.zip
To uninstall, set same values as for install. By default role removes content
only if installed directory, extracted icon and desktop file matches what it
would install. Finally set state variable to “absent”.
Specify local path to a downloaded release archive file:
- hosts: all
roles:
- role: scrool.ghidra
vars:
ghidra_archive_src: /tmp/ghidra_9.1.2_PUBLIC_20200212.zip
ghidra_state: absent
Alternatively you can enable option ghidra_force_remove
and again set state
variable to “absent”. In this case role won’t need nor even checkghidra_archive_src
. This effectively removes installation dir, extracted icon
and desktop entry file. Example:
- hosts: all
roles:
- role: scrool.ghidra
vars:
ghidra_state: absent
ghidra_force_remove: yes
This project is licensed under MIT License. See LICENSE for more
details.