https://github.com/darkwizard242/ansible-role-onepassword
Ansible role for 1password. Available on Ansible Galaxy.
https://github.com/darkwizard242/ansible-role-onepassword
1password 1password-gui-linux ansible ansible-role linux
Last synced: 4 months ago
JSON representation
Ansible role for 1password. Available on Ansible Galaxy.
- Host: GitHub
- URL: https://github.com/darkwizard242/ansible-role-onepassword
- Owner: darkwizard242
- License: mit
- Created: 2021-07-25T02:08:10.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2025-03-24T02:37:01.000Z (about 1 year ago)
- Last Synced: 2025-07-13T04:40:55.930Z (11 months ago)
- Topics: 1password, 1password-gui-linux, ansible, ansible-role, linux
- Language: Python
- Homepage: https://galaxy.ansible.com/darkwizard242/onepassword
- Size: 51.8 KB
- Stars: 3
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/darkwizard242/ansible-role-onepassword/actions?query=workflow%3Abuild-and-test) [](https://github.com/darkwizard242/ansible-role-onepassword/actions?query=workflow%3Arelease)  [](https://sonarcloud.io/dashboard?id=ansible-role-onepassword) [](https://sonarcloud.io/dashboard?id=ansible-role-onepassword) [](https://sonarcloud.io/dashboard?id=ansible-role-onepassword)  
# Ansible Role: onepassword
Role to install (_by default_) [1password](https://1password.com/) package for Debian based and EL based systems or uninstall (_if passed as var_) on **Debian** based and **EL** based systems.
## Requirements
None.
## Role Variables
Available variables are listed below (located in `defaults/main.yml`):
### Variables List:
```yaml
# Generic Variables
onepassword_app_name: 1password
onepassword_desired_state: present
# Debian Family Variables
onepassword_pre_reqs_debian:
- gnupg2
onepassword_pre_reqs_debian_desired_state: present
onepassword_repo_debian_gpg_key_url: https://downloads.1password.com/linux/keys/1password.asc
onepassword_repo_debian_gpg_key_keyring: /usr/share/keyrings/1password-archive-keyring.gpg
onepassword_repo_debian: "deb [arch=amd64 signed-by={{ onepassword_repo_debian_gpg_key_keyring }}] https://downloads.1password.com/linux/debian/amd64 stable main"
onepassword_repo_debian_filename: "{{ onepassword_app_name }}"
onepassword_repo_debian_desired_state: present
# EL Family Variables
onepassword_repo_el_name: 1password
onepassword_repo_el_description: 1Password Stable Channel
onepassword_repo_el: https://downloads.1password.com/linux/rpm/stable/$basearch
onepassword_repo_el_gpg_key: https://downloads.1password.com/linux/keys/1password.asc
onepassword_repo_el_enabled: yes
onepassword_repo_el_filename: "{{ onepassword_app_name }}"
onepassword_repo_el_gpgcheck: yes
onepassword_repo_el_repogpgcheck: yes
onepassword_repo_el_desired_state: present
```
### Variables table:
Variable | Description
----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
onepassword_app_name | Name of 1Password package to install by default i.e. `1password`.
onepassword_desired_state | State of the 1password_app_name package (i.e. `1password` package itself.). Whether to install, verify if available or to uninstall (i.e. ansible apt module values: `present`, `latest`, or `absent`)
onepassword_pre_reqs_debian | Package required by 1Password on Debain based systems.
onepassword_pre_reqs_debian_desired_state | State of the 1password_pre_reqs_debian_desired_state packages. Whether to install, verify if available or to uninstall (i.e. ansible apt module values: `present`, `latest`, or `absent`)
onepassword_repo_debian_gpg_key_url | 1Password GPG required on Debian based systems.
onepassword_repo_debian_gpg_key_keyring | 1Password Keyring file to store GPG key in.
onepassword_repo_debian | Repository URL for Debian based systems.
onepassword_repo_debian_filename | Name of the repository file that will be stored at `/etc/apt/sources.list.d/` on Debian based systems. Defaults to the variable value for "{{ 1password_app_name }}" which is `1password` by default.
onepassword_repo_debian_desired_state | State of Debian family repository file for 1Password.
onepassword_repo_el_name | Repository name for 1Password on EL based systems.
onepassword_repo_el_gpg_key | 1Password GPG required on EL based systems.
onepassword_repo_el_description | Description to be added in EL based repository file for 1Password.
onepassword_repo_el | Repository `baseurl` for 1Password on EL based systems.
onepassword_repo_el_gpgcheck | Boolean for whether to perform gpg check against 1Password on EL based systems.
onepassword_repo_el_repogpgcheck | Boolean for whether to perform gpg signature check against on the repodata for 1Password on EL based systems.
onepassword_repo_el_enabled | Boolean for whether to set 1Password repo as 'enabled' on EL based systems.
onepassword_repo_el_filename | Name of the repository file that will be stored at `/etc/yum/sources.list.d/` on EL based systems. Defaults to the variable value for "{{ 1password_app_name }}" which is `1password` by default.
onepassword_repo_el_desired_state | State of EL family repository file for 1Password.
## Dependencies
None
## Example Playbook
For default behaviour of role (i.e. installation of **1password** package) in ansible playbooks.
```yaml
- hosts: servers
roles:
- darkwizard242.onepassword
```
For customizing behavior of role (for e.g. update to latest available stable version, **1password** package) in ansible playbooks.
```yaml
- hosts: servers
roles:
- darkwizard242.onepassword
vars:
onepassword_app_name: latest
```
For customizing behavior of role (for e.g. un-installation of **1password** package) in ansible playbooks.
```yaml
- hosts: servers
roles:
- darkwizard242.onepassword
vars:
onepassword_desired_state: absent
```
## License
[MIT](https://github.com/darkwizard242/ansible-role-1password/blob/master/LICENSE)
## Author Information
This role was created by [Ali Muhammad](https://www.alimuhammad.dev/).