juju4 / ansible-MISP

ansible role to setup MISP, Malware Information Sharing Platform & Threat Sharing
BSD 2-Clause "Simplified" License
51 stars 21 forks source link

Run update routines before first login #23

Closed egypcio closed 1 year ago

egypcio commented 1 year ago

Description

Run a few tasks before first login to update Galaxies, Lists and more.

Motivation and Context

According to the official MISP install.sh script, the process before first login offers the possibility of running a few routines to keep the application up to date when its deployment process finishes.

One of the functions taking care of that is called updateGOWNT - on the date of this PR, that can be found here.

coreCAKE - also present on that very same version of INSTALL.sh - makes sure all Database upgrades are done, without logging in. The one particular piece of code which was related to the changes on this PR is the execution of runUpdates.

The main goal here is to have the benefit of automated updates to be executed before first login, on role's deployment.

How Has This Been Tested?

... to avoid adding too much screenshots of a console output, here's the second time the role was applied to the VM:

    ...

TASK [misp : Run admin update routines before first login] **********
ok: [misp.kvm.localdomain] => (item=runUpdates)
ok: [misp.kvm.localdomain] => (item=updateGalaxies)
ok: [misp.kvm.localdomain] => (item=updateWarningLists)
ok: [misp.kvm.localdomain] => (item=updateNoticeLists)

TASK [misp : Update object templates for "root@misp.kvm.localdomain"] **********
ok: [misp.kvm.localdomain]

TASK [misp : Create lock file on "/var/www/_MISP/MISP/.run_updates_lock"] **********
ok: [misp.kvm.localdomain]

    ...

PLAY RECAP **********
misp.kvm.localdomain  : ok=102  changed=12   unreachable=0    failed=0    skipped=119  rescued=0  ignored=0

Types of changes

Checklist:

juju4 commented 1 year ago

Thanks. LGTM. Need to review why CI is failing in docker/molecule. kitchen/lxc fine. Likely, latest ansible made import keyword forbidden. Will review that next week-end

egypcio commented 1 year ago

Thanks. LGTM. Need to review why CI is failing in docker/molecule. kitchen/lxc fine. Likely, latest ansible made import keyword forbidden. Will review that next week-end

ACK