Add Opera to 1Password allowed browsers
Some checks failed
Ansible Lint Check / check-ansible (push) Failing after 7s
Nix Format Check / check-format (push) Failing after 18s
Python Lint Check / check-python (push) Failing after 6s

This commit is contained in:
2025-07-23 16:28:49 +02:00
parent ef48cd2691
commit 4d0ff87ece
2 changed files with 50 additions and 45 deletions

View File

@@ -1,45 +1,50 @@
--- ---
- name: Check if 1Password is installed - name: Process 1Password custom allowed browsers
ansible.builtin.command: 1password --version block:
register: onepassword_check - name: Check if 1Password is installed
changed_when: false ansible.builtin.command: 1password --version
failed_when: false register: onepassword_check
changed_when: false
failed_when: false
- name: Check if 1Password is running anywhere - name: Check if 1Password is running anywhere
ansible.builtin.command: pgrep 1password ansible.builtin.command: pgrep 1password
register: onepassword_running register: onepassword_running
changed_when: false changed_when: false
failed_when: false failed_when: false
- name: Ensure 1Password custom allowed browsers directory exists - name: Ensure 1Password custom allowed browsers directory exists
ansible.builtin.file: ansible.builtin.file:
path: /etc/1password path: /etc/1password
state: directory state: directory
mode: "0755" mode: "0755"
become: true become: true
- name: Add Browsers to 1Password custom allowed browsers - name: Add Browsers to 1Password custom allowed browsers
ansible.builtin.copy: ansible.builtin.copy:
content: | content: |
ZenBrowser ZenBrowser
zen-browser zen-browser
app.zen_browser.zen app.zen_browser.zen
zen zen
Firefox Firefox
firefox firefox
dest: /etc/1password/custom_allowed_browsers opera
owner: root dest: /etc/1password/custom_allowed_browsers
group: root owner: root
mode: "0755" group: root
become: true mode: "0755"
register: custom_browsers_file become: true
register: custom_browsers_file
- name: Kill any running 1Password instances if configuration changed - name: Kill any running 1Password instances if configuration changed
ansible.builtin.command: pkill 1password ansible.builtin.command: pkill 1password
when: custom_browsers_file.changed and onepassword_running.stdout != "" when: custom_browsers_file.changed and onepassword_running.stdout != ""
changed_when: custom_browsers_file.changed and onepassword_running.stdout != "" changed_when: custom_browsers_file.changed and onepassword_running.stdout != ""
- name: If 1Password was killed, restart it... - name: If 1Password was killed, restart it...
ansible.builtin.command: screen -dmS 1password 1password ansible.builtin.command: screen -dmS 1password 1password
when: custom_browsers_file.changed and onepassword_running.stdout != "" when: custom_browsers_file.changed and onepassword_running.stdout != ""
changed_when: custom_browsers_file.changed and onepassword_running.stdout != "" changed_when: custom_browsers_file.changed and onepassword_running.stdout != ""
tags:
- custom_allowed_browsers

View File

@@ -25,11 +25,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1753055804, "lastModified": 1753198507,
"narHash": "sha256-KerePGJYX47ex6OY3CWsid4AltO2gDtQROunYJ0eCEE=", "narHash": "sha256-NCG6izg+B3zsCwcT6+ssiWT3Y202jhOqGL/zh6fofa4=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "adf195f021a8cbb0c317f75b52e96c82616526f9", "rev": "fce051eaf881220843401df545a1444ab676520c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -41,11 +41,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1752995727, "lastModified": 1753115646,
"narHash": "sha256-+xNQQqqCx47sbSbwwj/aQL5Xrv6wlgiIU/yKWVAtnc4=", "narHash": "sha256-yLuz5cz5Z+sn8DRAfNkrd2Z1cV6DaYO9JMrEz4KZo/c=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "a14f718bc528ad298bd95a18a9ac9a7d7c0ef8e5", "rev": "92c2e04a475523e723c67ef872d8037379073681",
"type": "github" "type": "github"
}, },
"original": { "original": {