diff --git a/README.md b/README.md index 7c4a824..9ba82af 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ Misc scripts for eve-ng. - -* Filebrowser role +* listimages2 -- this will produce a listing of all images on the server that are currently in use in a lab. Useful for cleaning up old versions of images. +* Filebrowser role -- FileBrowser is a web-based upload and download tool. This will allow web-based uploading of images to the eve-ng server as opposed to using SCP/WinSCP. Uploading a folder with an image to the eve-ng server via this interface will automatically run the eve-ng commands (unl_wrapper -a fixpermissions) upon completion. * apt install ansible sshpass - * ansible-playbook -i hosts filebrowser.yaml + * ansible-playbook -i hosts filebrowser.yaml -kK diff --git a/roles/filebrowser/tasks/main.yaml b/roles/filebrowser/tasks/main.yaml index dfcdeda..04fd24b 100644 --- a/roles/filebrowser/tasks/main.yaml +++ b/roles/filebrowser/tasks/main.yaml @@ -1,7 +1,7 @@ --- - name: get filebrowser binary get_url: - url: "https://github.com/filebrowser/filebrowser/releases/download/v2.16.1/linux-amd64-filebrowser.tar.gz" + url: "https://github.com/filebrowser/filebrowser/releases/download/v2.22.4/linux-amd64-filebrowser.tar.gz" dest: "/root/linux-amd64-filebrowser.tar.gz" tags: filebrowser register: filebrowser_download @@ -43,6 +43,10 @@ with_items: - config init -a 0.0.0.0 -p 8899 - users add admin admin --perm.admin + - cmds add "after_copy" "/opt/unetlab/wrappers/unl_wrapper -a fixpermissions" + - cmds add "after_delete" "/opt/unetlab/wrappers/unl_wrapper -a fixpermissions" + - cmds add "after_rename" "/opt/unetlab/wrappers/unl_wrapper -a fixpermissions" + - cmds add "after_save" "/opt/unetlab/wrappers/unl_wrapper -a fixpermissions" - cmds add "after_upload" "/opt/unetlab/wrappers/unl_wrapper -a fixpermissions" register: filebrowser_init when: filebrowser_etc