community.sops.install role – Install Mozilla sops

Note

This role is part of the community.sops collection (version 1.6.2).

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it use: ansible-galaxy collection install community.sops.

To use it in a playbook, specify: community.sops.install.

Entry point main – Install Mozilla sops

New in community.sops 1.5.0

Synopsis

  • This role installs Mozilla sops and Gnu Privacy Guard (GPG).

  • This role supports the following operating systems: Alpine (new enough), Arch Linux, CentOS 7, Stream 8, or newer, Debian 10 (Buster) or newer, Fedora (new enough), RHEL 7 or newer, Ubuntu 16.04 or newer LTS versions

  • The Ansible facts ansible_facts.architecture, ansible_facts.distribution, ansible_facts.distribution_major_version, ansible_facts.distribution_version, and ansible_facts.os_family are expected to be present if sops_install_on_localhost is false.

Parameters

Parameter

Comments

sops_become_on_install

boolean

Whether the role should use become: true when installing packages.

Choices:

  • false

  • true ← (default)

sops_github_latest_detection

string

added in community.sops 1.6.0

When installing the latest sops version from GitHub, configures how the latest release is detected.

auto tries api first and then uses latest-release.

api asks the GitHub API for a list of recent releases and picks the highest version.

latest-release uses a not fully documented URL to retrieve the release marked as “latest” by the repository maintainers.

Choices:

  • "auto"

  • "api"

  • "latest-release"

sops_github_token

string

added in community.sops 1.6.0

Token to provide when querying the GitHub API for the latest release. Without the token there are rather strict rate limits.

Should mainly be used in GitHub Actions.

sops_install_on_localhost

boolean

Installs sops on the Ansible controller (localhost) instead of the remote host.

Choices:

  • false ← (default)

  • true

sops_source

string

Determines the source from where sops is installed.

The value github will install sops from the Mozilla sops releases on GitHub (https://github.com/mozilla/sops/releases/).

The value system will install sops from the system packages. Note that not all system package repositories support sops.

The value auto will determine the best source to install sops from. Here, system package repositories are preferred over GitHub.

Choices:

  • "auto" ← (default)

  • "github"

  • "system"

sops_version

string

The version of sops to install.

Should be a version like 3.7.2. The special value latest will select the latest version available form the given source.

Default: "latest"

Authors

  • Felix Fontein (@felixfontein)