Loading...

Watch: Running a Playbook with JetPorch: A Quick Guide

Explore a basic JetPorch playbook syntax example Playbooknstrating task execution using the shell module to print "hi".

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:

``bash

$ cargo binstall jetp

`

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

`bash

$ which jetp

$ jetp --version

`

Installing from Source

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

`bash

$ 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](http://www.jetporch.com/).

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.

Playbook Syntax

A basic playbook file might look like the example below:

`yaml

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:

`bash

$ 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 overal

Read the full tutorial: Running a Playbook with JetPorch: A Quick Guide