JetPorch, the Jet Enterprise Professional Orchestrator, is a powerful IT automation platform designed for Linux and Mac systems. Whether you’re configuring, deploying, orchestrating, patching, or executing various tasks, JetPorch provides a flexible and community-driven solution. In this guide, we’ll explore how to run a playbook with JetPorch, covering installation and basic playbook syntax.

Installing JetPorch

JetPorch can be installed either from packages or built from source. As of the first release (Tech Preview 1 on September 29th, 2024), following the development branch is encouraged for the latest features and bug fixes. Monthly releases are expected, making it worthwhile to stay up-to-date.

Installing from Packages

For Rust users, JetPorch can be installed using the following command:

$ cargo binstall jetp

This command installs the jetp executable into ~/.cargo/bin. Verify the installation using:

$ which jetp
$ jetp --version

Installing from Source

Following the development branch ensures access to the latest features. Clone the repository and build JetPorch:

$ git clone <repository-url>
$ cargo build
$ cargo install --path .

Understanding Plays

In JetPorch, a playbook is a YAML list consisting of one or more Play structures. Plays assign work or configurations to hosts using tasks and groups. The playbook structure is best understood by referring to the official documentation.

What’s in a Name?

While the term “runbook” is common in IT, JetPorch adopts the term “playbook” from Ansible, using it as a sports analogy. Plays represent different strategies a team might employ in various situations. This adds a touch of fun to the concept, making it distinct from traditional IT metaphors.

Join 50+ hours of courses in our exclusive community

Playbook Syntax

A basic playbook file might look like the example below:

# playbook1.yml
- name: sample playbook
  groups:
    - all
  tasks:
    - !shell
      cmd: echo hi

This playbook selects groups from inventory (in this case, all) and applies tasks to any host machine in those groups.

Running a Playbook

Once JetPorch is installed and you have a playbook ready, running it is a straightforward process. Use the following command:

$ jetp local --playbook playbook.yml

This command initiates the playbook execution, displaying detailed progress and results. The output includes information on roles, tasks, hosts, and the overall status of the playbook run.

# Example Output
----------------------------------------------------------
> playbook start: /path/to/playbook.yml
----------------------------------------------------------
> play: sample playbook
----------------------------------------------------------
> batch 1/1, 1 hosts
----------------------------------------------------------
> begin task: Shell
… localhost => running
✓ localhost => complete
----------------------------------------------------------
> play complete: sample playbook
----------------------------------------------------------

┌─────────┬─────┬─────┐
│Results  │Items│Hosts│
├─────────┼─────┼─────┤
│Roles    │0    │     │
│Tasks    │1    │1    │
├─────────┼─────┼─────┤
│Matched  │0    │0    │
│Created  │0    │0    │
│Modified │0    │0    │
│Removed  │0    │0    │
│Executed │1    │1    │
│Passive  │0    │0    │
│Skipped  │0    │0    │
├─────────┼─────┼─────┤
│Unchanged│0    │0    │
│Changed  │1    │1    │
│Failed   │0    │0    │
└─────────┴─────┴─────┘

() Actions were applied.

Congratulations! You’ve successfully run a playbook with JetPorch, automating tasks on your system. Feel free to explore additional features and customize playbooks according to your automation needs.

Conclusion

In conclusion, JetPorch emerges as a robust and versatile IT automation platform, providing a seamless experience for configuration, deployment, orchestration, and task execution workflows on Linux and Mac systems. With a community-driven approach, JetPorch introduces an innovative take on playbooks, allowing users to execute strategies akin to plays in a sports game.

The installation process, whether from packages or source, is user-friendly, and staying updated with the development branch ensures access to the latest features and bug fixes. The playful terminology, drawing inspiration from sports analogies, adds a touch of fun to the traditionally technical realm of IT.

Understanding the playbook structure is crucial, and JetPorch’s YAML-based syntax simplifies the creation of complex automation workflows. The provided example showcases the basic elements of a playbook, making it accessible to both beginners and experienced users.

Executing a playbook with JetPorch is a straightforward process, providing detailed progress and results. The comprehensive output offers insights into the roles, tasks, hosts, and overall status of the playbook run, empowering users to validate the success of their automation efforts.

As you delve further into the capabilities of JetPorch, exploring additional features and tailoring playbooks to your specific automation needs becomes an exciting prospect. Whether you’re a seasoned IT professional or just starting, JetPorch opens up new possibilities for efficient and enjoyable IT automation. Embrace the power of JetPorch and elevate your automation game today.

Subscribe to the YouTube channel, Medium, and Website, X (formerly Twitter) to not miss the next episode of the Ansible Pilot.

Academy

Learn the Ansible automation technology with some real-life examples in my Udemy 300+ Lessons Video Course.

BUY the Complete Udemy 300+ Lessons Video Course

My book Ansible By Examples: 200+ Automation Examples For Linux and Windows System Administrator and DevOps

BUY the Complete PDF BOOK to easily Copy and Paste the 250+ Ansible code

Want to keep this project going? Please donate

Patreon Buy me a Pizza