Cyberchef install fixes

This commit is contained in:
Philip (a-0) 2022-07-30 19:24:36 +02:00
parent f524dbba6a
commit 6ab8b826c6
2 changed files with 18 additions and 5 deletions

View file

@ -1,20 +1,33 @@
- name: Install required packages
apt:
pkg:
- firejail
- npm
- node-grunt-cli
update_cache: yes
- name: Create cyberchef user
user:
name: cyberchef
group: cyberchef
system: yes
- name: Install grunt-cli
- name: Create cyberchef user's npm config dir
become_user: cyberchef
command: npm install -g grunt-cli
file:
path: /home/cyberchef/.npm-global
state: directory
- name: Set user's npm config path
become_user: cyberchef
command: npm config set prefix '~/.npm-global'
- name: Set user's path variable
copy:
path: /home/cyberchef/.profile
content: export PATH=~/.npm-global/bin:$PATH
- name: Clone CyberChef repo
become: yes
git:
repo: https://github.com/gchq/CyberChef.git
dest: "{{ cyberchef_root_dir }}"
@ -26,7 +39,7 @@
lineinfile:
path: "{{ cyberchef_root_dir }}Gruntfile.js"
regexp: "fixCryptoApiImports"
line: "fixCryptoApiImports: { options: { shell: \"/bin/bash\" },"
line: "fixCryptoApiImports: { options: { shell: '/bin/bash' },"
- name: Set permissions on repo
become: yes

View file

@ -4,7 +4,7 @@ Description=CyberChef hosting service
[Service]
User=cyberchef
WorkingDirectory={{ cyberchef_root_dir }}
ExecStart=firejail grunt dev
ExecStart=grunt dev
SyslogIdentifier=cyberchef
[Install]