Ansible Receptor Collection (ansible.receptor)

Description
This collection prepares and configures a node for running Receptor.
The setup role in particular will configure a systemd service to run Receptor.
As long as the service is running, the node will remain connected to other Receptor nodes in the mesh.
This collection supports defining the peering relationship between nodes.
Requirements
ansible_core >= 2.15.0
Python >= 3.9
Installation
Before using this collection, you need to install it with the Ansible Galaxy command-line tool:
ansible-galaxy collection install ansible.receptor
You can also include it in a requirements.yml file and install it with:
ansible-galaxy collection install -r requirements.yml
using the format:
collections:
- name: ansible.receptor
Note that if you install any collections from Ansible Galaxy,
they will not be upgraded automatically when you upgrade the Ansible package.
To upgrade the collection to the latest available version, run the following command:
ansible-galaxy collection install ansible.receptor --upgrade
You can also install a specific version of the collection, for example,
if you need to downgrade when something is broken in the latest version
(please report an issue in this repository).
Use the following syntax to install version 1.0.0:
ansible-galaxy collection install ansible.receptor:==1.0.0
See using Ansible collections
for more details.
Use Cases
This collection contains two roles:
- podman : installs and configures podman on the node
- setup: installs and configures Receptor on the node
Podman Role
Installs and configures podman.
Variables
| Parameter | Type | Defaults | Comments |
|---|
| podman_user | string | podman | The user under which podman will be configured. |
| podman_group | string | podman | The group under which podman will be configured. |
| default_runtime | string | crun | The default container runtime to use for podman. |
| default_cgroup_manager | string | cgroupfs | The default cgroup manager to use for podman. |
Setup Role
Installs and configures a Receptor node by doing the following:
- Install Receptor
- By default, Receptor is obtained via the pre-built binary on the Receptor Github release page.
- For Centos/Redhat/Fedora systems, Receptor can be installed via the
dnf package manager.
- It is also possible to upload a custom Receptor binary from the local filesystem to the node.
- Configure a systemd service to run whichever Receptor binary was obtained.
- This service should start automatically on system startup.
- Generate a Receptor configuration file.
- Start the Receptor service.
See receptor_install_method for options on how Receptor is installed.
Variables
| Parameter | Type | Defaults | Comments |
|---|
| receptor_install_method | string | release | Options are 'release', 'package', or 'local'. If 'package', will use the os-specific package manager to install Receptor. If 'local', will upload a local receptor binary. To be paired with receptor_local_bin_file. If 'release', the receptor binary will be downloaded from receptor Releases on github. |
| receptor_local_bin_file | string | '' | Path of local Receptor binary, if install method is 'local'. |
| receptor_install_dir | string | /usr/bin | Directory of the Receptor binary path on remote node. if install method is 'release' or 'local'. |
| receptor_packages | list | [] | Set the names of the packages needed to install Receptor, if install method is 'package'. |
| additional_python_packages | list | [] | Install additional python packages. |
| python_executable | string | python3 | The python executable for installing python packages. |
| pip_executable | string | pip3 | The pip executable for installing python packages. |
| additional_system_packages | list | ["python3-pip"] | Install other system packages, probably on a per-node-type basis using groupvars or hostvars. |
| receptor_user | string | receptor | The user under which Receptor will be configured. |
| receptor_group | string | receptor | The group under which Receptor will be configured. |
| receptor_socket_dir | string | /var/run/receptor | Directory for the Receptor control socket file. |
| receptor_control_filename | string | receptor.sock | Path of the control socket file. |
| receptor_config_dir | string | /etc/receptor | Path to the Receptor config file. |
| routable_hostname | string | |
Testing
This collection has been tested on the following distributions:
| OS | Release | Tested (Y/N) |
|---|
| Centos | >=8 | Y |
| Redhat | >=8 | Y |
| Debian | >=11 | Y |
Code Quality
This project uses SonarCloud
for continuous code quality analysis.
- Quality Analysis: All pull requests are automatically analyzed for code quality
- Quality Gate: New code must meet quality standards including maintainability,
reliability, and security
- Dynamic Analysis: SonarCloud performs continuous code quality checks on all contributions
Note: This is an Ansible collection with YAML-based roles. Testing is performed using Molecule.
To run tests locally:
pip install -r molecule/requirements.txt
molecule test
Contributing
We value all feedback.
To report an issue or propose an enhancement,
please open an issue in our GitHub project.
We also encourage and welcome contributions!
To fix an issue or make code changes, please create a fork and submit a pull request PR.
Support
As Red Hat Ansible Certified Content, this collection is entitled to support through the
Ansible Automation Platform (AAP) using the Create issue button on the top right corner.
If a support case cannot be opened with Red Hat
and the collection has been obtained either from Galaxy or GitHub,
there may community help available on the Ansible Forum.
Release Notes and Roadmap
Release Notes
License Information
Apache 2