0
votes

I am currently trying to install firefox addons with Ansible. I found a role for ansible on ansible galaxy, I fixed to work with the latest ansible version (minor python2/3 issue): Fixed version: https://github.com/cyborg-x1/ansible-firefox The Ansible role downloads the xpi file and puts it in the extension folder. But two issues:

1. Issue

If the .mozilla/firefox/randomString.default-release folder does not exist, it creates it, but then Firefox on the first start creates another directory .mozilla/firefox/randomString.default-release-1 and does not use the directory except selected by profile manager.

2. Issue

The addons are placed in the extension folder, but when starting up they are disabled. Anoying to do that for > 6 addons.

I tried to to see what changes when I enable the addons by putting a git repo over the ~/.mozilla folder. Multiple files are created the main responsible is a json one where it puts the rights. If I copy that file and just put that in later, it seems NoScript works, but not uMatrix which does not work at all: button with no icon, no reaction when pressing the button.


I also found the way to use /usr/share/mozilla to install addons globally. Problem is, this way, according to documentation, requires to have the addon uid, but that file mentioned (don't recall the name atm) is not present in latest addons of Firefox. So I can not put the appropriate folder name for the addon. Just placing the xpi files there, does nothing at all.

Also on the mozilla docs there is a way mentioned with -install-addon-globally which I tried with firefox executable and the addon file -- no success.

Any Ideas how to solve those issues? Something that I just need to write in there and they run their installation stuff, what actually seems to be missing when just placing that file.

The first issue could be solved, if I just could run firefox once and close it, then the folder would be there and I can write into it but there is no command line option which terminates firefox after starting, so for Ansible I would need timeout to kill it if it does not return - (I think that's an ugly solution btw)

Any ideas or suggestions?

Thanks for any help!

1

1 Answers