Add Ansible configuration and remove NixOS
All checks were successful
Nix Format Check / check-format (pull_request) Successful in 39s
All checks were successful
Nix Format Check / check-format (pull_request) Successful in 39s
This commit is contained in:
43
config/ansible/tasks/1password.yml
Normal file
43
config/ansible/tasks/1password.yml
Normal file
@@ -0,0 +1,43 @@
|
||||
- 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"
|
Reference in New Issue
Block a user