gotmax23.pass

Ansible Role: pass

Role gotmax23.pass Github Repo SourceHut Repo MIT Licensed Github Open Issues Github Open PRs Role Version Commits since last version Galaxy Role Quality Galaxy Role Downloads Github Actions Molecule workflow status Github Actions Galaxy workflow status

This Ansible role installs pass, the standard Unix password manager.

Beta Warning

This role is in beta and not meant for production use. Changes that might break compatibility could occur between releases, so please read the release notes.

Requirements

If you are on Enterprise Linux (CentOS, Rocky Linux, AlmaLinux, RHEL, etc.), you need the EPEL repository. You can use the robertdebock.epel role for this. Check the example playbook for a full example.

This role relies on specific collections not included in ansible-core.

To meet this role's requirements, create a requirements.yml file with the following:

---
roles:
  - name: robertdebock.epel
collections:
  - name: community.general

Then, if you are using ansible-base/ansible-core version 2.10 or later, run this command:

ansible-galaxy install -r requirements.yml

If you are using Ansible 2.9, use these commands instead:

ansible-galaxy collection install -r requirements.yml
ansible-galaxy role install -r requirements.yml

Role Variables

Installation Methods

This role lets you choose where to install Pass from. You can change the default installation method by setting pass_install_method to one of the options below.

pass_install_method=distro_package

  • Description: Installs Pass from the distribution's repositories. This version may be outdated.
  • Supported Distributions: All distributions supported by this role
  • Default: Yes

pass_install_method=source

  • Description: Installs Pass from source.
  • Supported Distributions: All distributions supported by this role
  • Default: No

Here are the role variables and their default values, as defined in defaults/main.yml. You can change these to customize how the role works.

---
# defaults file for pass
pass_install_method: distro_package  # Default installation method

pass_state: "present"  # Ensure Pass is installed

pass_clipboard_helper: xclip  # For copying passwords to clipboard

##########
# These Variables only apply when `pass_install_method=source`.

pass_download_path: /opt/pass  # Download location for Pass source

pass_version: latest  # Version of Pass to install

pass_make_params:
  PREFIX: /usr/local  # Install Pass to /usr/local/bin

Example Playbook

---
- name: Install Pass
  hosts: all
  become: true

  tasks:
    - name: Update apt cache
      when: ansible_pkg_mgr == "apt"
      ansible.builtin.apt:
        update_cache: true
        cache_valid_time: 3600

    - name: Install EPEL Repo (only on EL-based distros)
      ansible.builtin.include_role:
        name: robertdebock.epel

    - name: Install Pass
      ansible.builtin.include_role:
        name: "gotmax23.pass"

Compatibility

This role works with the latest version of ansible-core and the latest collections from Ansible Galaxy. It officially supports only this version of Ansible, but some support is given for others.

This role is compatible with these distributions:

distro versions
Archlinux any
Debian buster, bullseye, bookworm
EL 8
Fedora 34, 35, 36
opensuse 15.3, tumbleweed
Ubuntu bionic, focal

License

MIT

Author

Maxwell G (@gotmax23)

Informazioni sul progetto

Ansible role that installs password-store (pass), the standard Unix password manager.

Installa
ansible-galaxy install gotmax23.pass
Licenza
mit
Download
115
Proprietario
@gotmax:matrix.org | Fedora developer. Ansible Community Steering Committee member. Pythonista. | See my sr.ht profile for my current code.