How do I structure modules for Pull request workflows in Salt?

In order to structure modules for Pull Request workflows in Salt, you'll want to focus on creating a clean and organized directory structure that separates concerns and enhances maintainability. This guide will walk you through best practices and provide an example of how to create a module specifically for handling Pull Requests.

Directory Structure

Your Salt repository should have a modular structure. Here’s a recommended structure:

  • salt/
    • pull_request/
      • __init__.py
      • manager.py
      • utils.py
    • states/
    • grains/
    • templates/

Example Module: Pull Request Manager

The following is an example of a simple Pull Request management module:


DevOps SaltStack Pull Request Workflow Salt Modules