Files
dotfiles/config/ansible/tasks/1password.yml
Menno van Leeuwen e1aa41d1d3
All checks were successful
Nix Format Check / check-format (pull_request) Successful in 39s
Add Ansible configuration and remove NixOS
2025-01-20 09:18:58 +01:00

44 lines
1.3 KiB
YAML

- name: Import 1Password GPG key (RPM)
ansible.builtin.rpm_key:
key: https://downloads.1password.com/linux/keys/1password.asc
state: present
when: ansible_pkg_mgr == "yum" or ansible_pkg_mgr == "dnf"
- name: Import 1Password GPG key (APT)
ansible.builtin.apt_key:
url: https://downloads.1password.com/linux/keys/1password.asc
state: present
when: ansible_pkg_mgr == "apt"
- name: Add 1Password repository (RPM)
ansible.builtin.copy:
content: |
[1password]
name=1Password Stable Channel
baseurl=https://downloads.1password.com/linux/rpm/stable/$basearch
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://downloads.1password.com/linux/keys/1password.asc
dest: /etc/yum.repos.d/1password.repo
mode: '0644'
when: ansible_pkg_mgr == "yum" or ansible_pkg_mgr == "dnf"
- name: Add 1Password repository (APT)
ansible.builtin.apt_repository:
repo: deb [arch=amd64] https://downloads.1password.com/linux/debian stable main
state: present
when: ansible_pkg_mgr == "apt"
- name: Install 1Password CLI (RPM)
ansible.builtin.package:
name: 1password-cli
state: present
when: ansible_pkg_mgr == "yum" or ansible_pkg_mgr == "dnf"
- name: Install 1Password CLI (APT)
ansible.builtin.package:
name: 1password-cli
state: present
when: ansible_pkg_mgr == "apt"