Manual

Examples

Scripts to read, in examples/: from a one-file hello world to a k3s cluster and the applications on it.

They are in examples/ in the source. Each is a script that runs as it is: python examples/hello.py show lists what it declares, without touching a host.

To start with#

ScriptWhat it shows
hello.pythe one-file hello world
webserver.pya role, group_vars, a template and a real inventory
profiles.pyone script, prod and dev
stack.pyeverything at once: galaxy requirements, a local collection, molecule and ansible-test targets, a custom check, profiles
A recorded run of examples/webserver2.py.

A cluster, described#

k3s.py and the applications on it use described groups and variables, and stages that run alone. cluster.py imports them all: the k3s cluster and everything on it, as one playbook.

ScriptWhat it sets up
k3s.pyk3s on hardened Fedora droplets that are reached over Tailscale
longhorn.pyLonghorn, storage that is kept on more than one node
gitea.pyGitea, reached over Tailscale
gitea_runner.pya runner for Gitea Actions
zot.pya container registry, zot
monitoring.pyGrafana and Prometheus
awx.pyAWX, reached over Tailscale
rancher.pyRancher Manager
kanboard.pyKanboard, with what an older one held
portfolio.pya Hugo site, served by nginx
chronoclone.pyChronoClone’s scan service
instamix_deploy.pywhat instamix’s own pipeline deploys with

wordpress.py is what imix import wrote from an existing playbook tree.

Reading one#

$ python examples/k3s.py describe          # its stages, groups and variables
$ python examples/k3s.py cat site.yml      # what it would hand to ansible
$ python examples/cluster.py describe      # the same, of the whole

The source of this page

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