local/roles/1password/tasks/Debian.yaml
Kenneth Benzie (Benie) 09e7ec3ad4 Merge op role into 1password role
Additionally:

* Stop using Chocolatey packages for 1password as they are not up to
  date, instead download and install directly.
* Switch to apt repository on Debian.
* Add zsh completions for macOS and Dabian.
* Add powershell completions for Windows.
2022-07-03 11:25:05 +01:00

39 lines
884 B
YAML

---
- name: add apt signing key
become: true
apt_key:
url: https://downloads.1password.com/linux/keys/1password.asc
keyring: /etc/apt/trusted.gpg.d/1password-archive-keyring.gpg
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
become: true
apt_repository:
repo: >-
deb [arch={{arch}}
signed-by=/etc/apt/trusted.gpg.d/1password-archive-keyring.gpg]
https://downloads.1password.com/linux/debian/{{arch}} stable main
- name: install gui package
when: '"WSL" not in ansible_kernel'
become: true
apt:
name: 1password
state: latest
- name: install cli package
become: true
apt:
name: 1password-cli
state: latest
- include_tasks: zsh-completion.yaml