summaryrefslogtreecommitdiffstats
path: root/roles/firefox/tasks/install_passff.yml
diff options
context:
space:
mode:
authorAhmed Abdelhalim <[email protected]>2025-11-24 22:16:43 +0100
committerAhmed Abdelhalim <[email protected]>2025-11-24 22:29:51 +0100
commitbb251e5e6066d4eb89cdb70f682dfe7a88030a13 (patch)
tree8a68bc1705bea688eb8b5e63307cc6323a4e6826 /roles/firefox/tasks/install_passff.yml
parenta41a92c635d7a4d5a72f55869082f1a76623cd45 (diff)
Add initial firefox role implementation with only GNOME support for pass
Diffstat (limited to 'roles/firefox/tasks/install_passff.yml')
-rw-r--r--roles/firefox/tasks/install_passff.yml44
1 files changed, 44 insertions, 0 deletions
diff --git a/roles/firefox/tasks/install_passff.yml b/roles/firefox/tasks/install_passff.yml
new file mode 100644
index 00000000..70f3f397
--- /dev/null
+++ b/roles/firefox/tasks/install_passff.yml
@@ -0,0 +1,44 @@
+---
+- name: "Add passff to default extensions"
+ ansible.builtin.set_fact:
+ firefox_default_extensions: "{{ firefox_default_extensions | combine(firefox_passff_extension) }}"
+ vars:
+ firefox_passff_extension:
+ installation_mode: "force_installed"
+ install_url: "https://addons.mozilla.org/firefox/downloads/latest/passff/latest.xpi"
+
+- name: "Ensure passff native messaging host is installed"
+ become: true
+ ansible.builtin.shell: |
+ set -euo pipefail
+ curl -sSL https://codeberg.org/PassFF/passff-host/releases/download/latest/install_host_app.sh | bash -s -- firefox
+ args:
+ creates: "/usr/lib/mozilla/native-messaging-hosts/pro.invicem.passff.json"
+ executable: "/bin/bash"
+
+- name: "Create browserpass native messaging hosts file"
+ become: true
+ ansible.builtin.copy:
+ dest: "/usr/lib/mozilla/native-messaging-hosts/passff.json"
+ mode: "0644"
+ content: |
+ {
+ "name": "passff",
+ "description": "Host for communicating with zx2c4 pass",
+ "path": "/usr/lib/mozilla/native-messaging-hosts/passff-wrapper",
+ "type": "stdio",
+ "allowed_extensions": [ "[email protected]" ]
+ }
+
+- name: "Create passff wrapper"
+ become: true
+ ansible.builtin.copy:
+ dest: "/usr/lib/mozilla/native-messaging-hosts/passff-wrapper"
+ mode: "0755"
+ content: |
+ #!/bin/sh
+ # NOTE: this uses the dotfiles pinentry-wrapper which forces the usage of GUI pinentry in this case.
+ # REF: https://git.sr.ht/~a14m/.rc/tree/94b355aa0ce648e3d41bfa7ef76611e3650523d2/item/.gnupg/pinentry-wrapper
+ export PINENTRY_USER_DATA=gnome
+ exec /usr/lib/mozilla/native-messaging-hosts/passff.py "$@"