Initial cyberchef scripts

This commit is contained in:
Philip (a-0) 2022-07-29 00:01:23 +02:00
parent 27d9892ff1
commit 1aef54b1b9
6 changed files with 69 additions and 1 deletions

View file

@ -0,0 +1,7 @@
---
- name: Install generally important packages
apt:
pkg:
- htop
update_cache: yes

View file

@ -0,0 +1,2 @@
---
cyberchef_root_dir: /var/services/CyberChef/

View file

@ -0,0 +1 @@
---

View file

@ -0,0 +1,46 @@
- name: Install required packages
apt:
pkg:
- firejail
- npm
update_cache: yes
- name: Create cyberchef user
user:
name: cyberchef
system: yes
- name: Install grunt-cli
become_user: cyberchef
command: npm install -g grunt-cli
- name: Clone CyberChef repo
git:
repo: https://github.com/gchq/CyberChef.git
dest: "{{ cyberchef_root_dir }}"
clone: yes
update: yes
- name: Set permissions on repo
become: yes
file:
path: "{{ cyberchef_root_dir }}"
owner: cyberchef
recurse: yes
- name: Install CyberChef
become_user: cyberchef
command: "cd {{ root_dir }}; npm install"
- name: Set systemd service
become: yes
template:
src: cyberchef.service.j2
dest: /etc/systemd/system/cyberchef.service
- name: Enable & start cyberchef
service:
name: cyberchef
state: restarted
enabled: yes
daemon_reload: yes

View file

@ -0,0 +1,11 @@
[Unit]
Description=CyberChef hosting service
[Service]
User=cyberchef
WorkingDirectory={{ cyberchef_root_dir }}
ExecStart=firejail grunt dev
SyslogIdentifier=cyberchef
[Install]
WantedBy=multi-user.target

View file

@ -4,3 +4,4 @@
roles: roles:
- system_settings - system_settings
- tor_gateway - tor_gateway
- basic_packages