diodonfrost.sops

ansible-role-sops

molecule Ansible Galaxy

This role provide a compliance for install sops on your target host.

Requirements

None.

Role Variables

This role has multiple variables. The defaults for all these variables are the following:

---
# defaults file for sops

# Define sops version to install
# Default: latest
sops_version: latest

# Define where to download sops package url
# Default: use local system path defined in Ansible vars/*.yml
sops_pkg_url: "{{ default_sops_pkg_url }}"

# Define where to install sops binary
# Default: use local system path defined in Ansible vars/*.yml
sops_bin_directory: "{{ default_sops_bin_directory }}"

Dependencies

None

Example Playbook

This is a sample playbook file for deploying the Ansible Galaxy sops role in a localhost and installing the latest version of sops.

---
- hosts: localhost
  become: true
  roles:
    - role: diodonfrost.sops

This role can also install a specific version of sops.

---
- hosts: localhost
  become: true
  roles:
    - role: diodonfrost.sops
      vars:
        sops_version: v3.7.3

Local Testing

This project uses Molecule to aid in the development and testing.

To develop or test you'll need to have installed the following:

Testing with Docker

# Install requirements
pip install -r requirements-dev.txt

# Test ansible role with ubuntu 22.04
molecule test

# Test ansible role with ubuntu 20.04
image=ansible-ubuntu:20.04 molecule test

# Test ansible role with alpine latest
image=ansible-alpine:latest molecule test

# Create ubuntu 22.04 instance
molecule create

# Apply role on ubuntu 22.04 instance
molecule converge

# Launch tests on ubuntu 22.04 instance
molecule verify

Testing with Vagrant and Libvirt

# Test ansible role with Windows
molecule test -s windows

License

Apache 2

Author Information

This role was created in 2023 by diodonfrost.

About

Install and configure Mozzila Sops

Install
ansible-galaxy install diodonfrost.sops
GitHub repository
License
apache-2.0
Downloads
264