mirror of https://github.com/MISP/ansible
51 lines
1.1 KiB
YAML
51 lines
1.1 KiB
YAML
############################################
|
|
##### MISP-MODULES ####
|
|
############################################
|
|
|
|
- name: Install all needed packages
|
|
apt:
|
|
pkg: "{{ item }}"
|
|
state: latest
|
|
update_cache: yes
|
|
with_items:
|
|
- python3-dev
|
|
- python3-pip
|
|
- libpq5
|
|
- libjpeg-dev
|
|
- libjpeg8-dev
|
|
|
|
- name: Clone MISP-MODULES git
|
|
become: true
|
|
git:
|
|
repo: "https://github.com/MISP/misp-modules.git"
|
|
dest: "/usr/local/src/misp-modules"
|
|
recursive: yes
|
|
force: no
|
|
update: no
|
|
accept_hostkey: yes
|
|
|
|
- name: Install MISP-MODULES requirements
|
|
become: true
|
|
pip:
|
|
executable: pip3
|
|
requirements: "/usr/local/src/misp-modules/REQUIREMENTS"
|
|
environment:
|
|
TMPDIR: /opt/misp-server/tmp
|
|
register: mispmodules_requirements
|
|
|
|
- name: Upgrade MISP-MODULES requirements
|
|
become: True
|
|
args:
|
|
chdir: "/usr/local/src/misp-modules"
|
|
shell: "{{ item }}"
|
|
with_items:
|
|
- pip3 install --upgrade .
|
|
when: mysql_init.changed
|
|
|
|
- name: Check MISP worker autolaunch at boot
|
|
lineinfile:
|
|
state: present
|
|
dest: /etc/rc.local
|
|
insertbefore: "exit 0"
|
|
line: "su misp -c 'misp-modules -s'"
|