local/roles/1password/tasks/Debian.yaml

52 lines
1.2 KiB
YAML

---
- set_fact:
keyring: /etc/apt/trusted.gpg.d/1password-archive-keyring.gpg
- name: add apt signing key
when: '"WSL" not in ansible_kernel'
become: true
apt_key:
url: https://downloads.1password.com/linux/keys/1password.asc
keyring: '{{keyring}}'
state: present
- when: ansible_machine == 'x86_64'
set_fact:
arch: amd64
- assert:
that: arch is defined
fail_msg: 'Architecture not currently supported: {{ansible_machine}}'
- name: add apt repository
when: '"WSL" not in ansible_kernel'
become: true
apt_repository:
repo: >-
deb [arch={{arch}} signed-by={{keyring}}]
https://downloads.1password.com/linux/debian/{{arch}} stable main
filename: 1password
- name: install gui package
when: '"WSL" not in ansible_kernel'
become: true
apt:
name: 1password
state: latest
- name: install cli package
when: '"WSL" not in ansible_kernel'
become: true
apt:
name: 1password-cli
state: latest
- name: create symlink to op.exe
when: '"WSL" in ansible_kernel'
file:
state: link
src: /mnt/c/Users/Benie/AppData/Local/1Password/cli/op.exe
dest: ~/.local/bin/op
- include_tasks: zsh-completion.yaml