The Parallel Multithreaded Machine (PM2) Ansible collection includes Ansible modules to help the management of PM2 processes.
This collection has been tested against following PM2 versions: >=4.2.0.
This collection has been tested against following Ansible versions: >=2.10.0.
Plugins and modules within a collection may be tested with only specific Ansible versions. A collection may contain metadata that identifies these versions. PEP440 is the schema used to describe the versions of Ansible.
Name | Description |
---|---|
just1not2.pm2.pm2_facts | Return PM2 information as fact data |
just1not2.pm2.pm2_process | Manage PM2 processes |
You can install the PM2 collection with the Ansible Galaxy CLI:
ansible-galaxy collection install just1not2.pm2
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: just1not2.pm2
You can either call modules by their Fully Qualified Collection Namespace (FQCN), such as just1not2.pm2.pm2_facts
, or you can call modules by their short name if you list the just1not2.pm2
collection in the playbook's collections keyword:
---
- name: Populate PM2 facts
just1not2.pm2.pm2_facts:
- name: Print the list of PM2 processes
debug:
var: ansible_facts.pm2.processes
- name: Make sure PM2 example process is running
just1not2.pm2.pm2_process:
name: example
file: /path/to/script.py
state: started
- PM2 official documentation
- Ansible Using collections for more details
This collection started as personal project, but I welcome community contributions to this collection. If you find problems, please open an issue or create a PR against the PM2 collection repository.
You can also reach me by email at [email protected]
.
GNU General Public License v3.0 or later.
See LICENSE to see the full text.
This collection was created in 2022 by Justin Béra.