Manual

Playbook repositories

A playbook repository is a git repository with instamix scripts in it. Nothing declares what it holds: the scripts describe themselves.

A playbook repository is a git repository with instamix scripts in it. Nothing declares what it holds: the scripts describe themselves.

$ imix repo add https://git.example.com/infra.git      # cloned as "infra"
$ imix repo list
$ imix repo sync                                       # pull them all
$ imix plays                                           # every script, and its stages
~/.local/share/instamix/repos/infra/k3s.py  [infra]
    k3s_tailnet   Join the hosts to the tailnet
    k3s_server    Install the k3s server
~/.local/share/instamix/repos/infra/cluster.py  [infra]
  + k3s_tailnet   Join the hosts to the tailnet        # +: from a script it imports

imix plays [PATH...] looks in the repositories and in the directories of the plays.path setting (or under the PATHs you give); --json writes it as one object.

Importing from a repository#

A script imports from a repository by its name:

from instamix import repo

repo("infra")          # its directory goes on the import path
import k3s             # and what k3s.py describes is added to this script

What a script imports this way it gets whole: the groups, the variables and the stages. See Stitching scripts together.

The source of this page

    Type to search. ↑ ↓ to move, enter to open.