Cyberchef install fixes
This commit is contained in:
parent
f524dbba6a
commit
6ab8b826c6
2 changed files with 18 additions and 5 deletions
|
@ -1,20 +1,33 @@
|
||||||
- name: Install required packages
|
- name: Install required packages
|
||||||
apt:
|
apt:
|
||||||
pkg:
|
pkg:
|
||||||
- firejail
|
|
||||||
- npm
|
- npm
|
||||||
|
- node-grunt-cli
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
|
|
||||||
- name: Create cyberchef user
|
- name: Create cyberchef user
|
||||||
user:
|
user:
|
||||||
name: cyberchef
|
name: cyberchef
|
||||||
|
group: cyberchef
|
||||||
system: yes
|
system: yes
|
||||||
|
|
||||||
- name: Install grunt-cli
|
- name: Create cyberchef user's npm config dir
|
||||||
become_user: cyberchef
|
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
|
- name: Clone CyberChef repo
|
||||||
|
become: yes
|
||||||
git:
|
git:
|
||||||
repo: https://github.com/gchq/CyberChef.git
|
repo: https://github.com/gchq/CyberChef.git
|
||||||
dest: "{{ cyberchef_root_dir }}"
|
dest: "{{ cyberchef_root_dir }}"
|
||||||
|
@ -26,7 +39,7 @@
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: "{{ cyberchef_root_dir }}Gruntfile.js"
|
path: "{{ cyberchef_root_dir }}Gruntfile.js"
|
||||||
regexp: "fixCryptoApiImports"
|
regexp: "fixCryptoApiImports"
|
||||||
line: "fixCryptoApiImports: { options: { shell: \"/bin/bash\" },"
|
line: "fixCryptoApiImports: { options: { shell: '/bin/bash' },"
|
||||||
|
|
||||||
- name: Set permissions on repo
|
- name: Set permissions on repo
|
||||||
become: yes
|
become: yes
|
||||||
|
|
|
@ -4,7 +4,7 @@ Description=CyberChef hosting service
|
||||||
[Service]
|
[Service]
|
||||||
User=cyberchef
|
User=cyberchef
|
||||||
WorkingDirectory={{ cyberchef_root_dir }}
|
WorkingDirectory={{ cyberchef_root_dir }}
|
||||||
ExecStart=firejail grunt dev
|
ExecStart=grunt dev
|
||||||
SyslogIdentifier=cyberchef
|
SyslogIdentifier=cyberchef
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue