Components

The seventeen built-in components of the kikx registry, generated from GET /api/registry. Components and fields are also printed by kikx list.

Every field value is a string. Every template also receives name, namespace and labels, described in Registry item format. Output paths are relative to the target directory and are rendered with the same context as the file content.

Fields with a format are checked before rendering, and their value is normalised: ip takes one IPv4 or IPv6 address, and cidr takes a range in CIDR notation that starts on its boundary (10.10.0.0/16, not 10.10.0.5/16). An invalid value fails rendering with an error that suggests the corrected value. An empty value is not checked.

A reference resolves to a built-in when the part after its last / equals a built-in name. See Registry item format.

With the CLI, you set a field with --set <field>=<value> on kikx add, using the names in the field tables. In the web app, each component is an entry in the builder’s catalog, under one of its stages, and its fields are a form. The In the app note under each component gives the stage, the entry and the form fields as they are labelled in the app. See The web app.

Summary

Reference

Title

Description

Output paths

k8s/deployment

Deployment

Pods running one container image.

{{ name }}-deployment.yaml

k8s/service

Service

A stable address for pods.

{{ name }}-service.yaml

k8s/ingress

Ingress

Routes HTTP traffic to a service.

{{ name }}-ingress.yaml

terraform/digitalocean

DigitalOcean Droplet

Terraform for one or more DigitalOcean droplets.

{{ name }}-digitalocean.tf

terraform/hetzner

Hetzner Cloud Server

Terraform for one or more Hetzner Cloud servers.

{{ name }}-hetzner.tf

terraform/aws

AWS EC2 Instance

Terraform for one or more AWS EC2 instances.

{{ name }}-aws.tf

terraform/google

Google Compute Engine Instance

Terraform for one or more Google Compute Engine instances.

{{ name }}-google.tf

terraform/scaleway

Scaleway Instance

Terraform for one or more Scaleway instances with public IPs.

{{ name }}-scaleway.tf

terraform/linode

Linode Instance

Terraform for one or more Linode instances.

{{ name }}-linode.tf

ansible/k8s-bootstrap

Kubernetes Bootstrap

Installs containerd, kubelet, kubeadm and kubectl on target hosts.

{{ name }}-k8s-bootstrap.yml

ansible/inventory

Inventory

Hosts, groups, nesting and shared vars for servers you already have.

{{ name }}-inventory.ini

ansible/group-vars

Group vars

Variables for one inventory group.

group_vars/{{ group }}{% if layout == "dir" %}/main{% endif %}.yml

ansible/common-role

Common role

A starter host-hygiene role: base packages, timezone, swap, a templated motd.

roles/{{ name }}/tasks/main.yml
roles/{{ name }}/defaults/main.yml
roles/{{ name }}/handlers/main.yml
roles/{{ name }}/templates/motd.j2

ansible/role

Role skeleton

An empty role (tasks, defaults, handlers, meta) to fill in.

roles/{{ name }}/tasks/main.yml
roles/{{ name }}/defaults/main.yml
roles/{{ name }}/handlers/main.yml
roles/{{ name }}/meta/main.yml

ansible/playbook

Playbook

One or more plays, each running roles on an inventory group.

{% if folder %}{{ folder }}/{% endif %}{{ name }}.yml

ansible/site

Site playbook

The entry point that imports your playbooks in order.

{{ name }}.yml

ansible/config

Ansible config

ansible.cfg pointing Ansible at your inventory and roles, so playbooks in subfolders find them.

ansible.cfg

k8s/deployment

Property

Value

Title

Deployment

Description

Pods running one container image.

Output paths

{{ name }}-deployment.yaml

Template fallbacks

labels are written to metadata.labels; spec.selector.matchLabels and the pod template label are always app: <name>

Field

Required

Default

Example

Options

Description

image

yes

nginx:1.27

replicas

no

1

port

no

80

In the app: Deploy > Deployment. Fields: Name, Image, Port, Replicas, Namespace (empty uses the project’s default namespace) and Labels (Add label).

k8s/service

Property

Value

Title

Service

Description

A stable address for pods.

Output paths

{{ name }}-service.yaml

Template fallbacks

target_port unset: targetPort is port; spec.selector is only app: <labels.app>, which defaults to app: <name>; when labels has keys other than app, all labels are written to metadata.labels

Field

Required

Default

Example

Options

Description

port

no

80

target_port

no

Container port; defaults to the service port.

In the app: Deploy > Service. Fields: Name, Port, Target port, Namespace and Labels.

k8s/ingress

Property

Value

Title

Ingress

Description

Routes HTTP traffic to a service.

Output paths

{{ name }}-ingress.yaml

Template fallbacks

host unset: <name>.example.com; service unset: <name>; pathType is always Prefix

Field

Required

Default

Example

Options

Description

host

no

app.example.com

path

no

/

service

no

Backend service; defaults to the ingress name.

port

no

80

In the app: Deploy > Ingress. Fields: Name, Host, Port, Path, Backend service (suggests the services in the project), Namespace and Labels.

terraform/digitalocean

Property

Value

Title

DigitalOcean Droplet

Description

Terraform for one or more DigitalOcean droplets.

Output paths

{{ name }}-digitalocean.tf

Template fallbacks

Declares variable do_token (sensitive) and a digitalocean provider; resource digitalocean_droplet.<name> named <name>-${count.index}. With private_network, a digitalocean_vpc.<name> with that ip_range, set as each droplet’s vpc_uuid

Field

Required

Default

Example

Options

Description

region

yes

nyc3

size

yes

s-2vcpu-4gb

os_image

yes

ubuntu-24-04-x64

ubuntu-24-04-x64 (Ubuntu 24.04)
ubuntu-22-04-x64 (Ubuntu 22.04)
debian-13-x64 (Debian 13)
fedora-44-x64 (Fedora 44)
rockylinux-9-x64 (Rocky Linux 9)
almalinux-9-x64 (AlmaLinux 9)

Any image slug the provider accepts; the list is a shortcut.

count

no

1

private_network

no

10.10.0.0/16

Format cidr. Private network range for these servers, in CIDR notation. Leave empty to use the provider’s default network.

In the app: Provision > Cloud server, then choose DigitalOcean Droplet in Provider. Fields: Name, Region, Size, OS image (with the options above as suggestions), Count and Private network.

terraform/hetzner

Property

Value

Title

Hetzner Cloud Server

Description

Terraform for one or more Hetzner Cloud servers.

Output paths

{{ name }}-hetzner.tf

Template fallbacks

Declares variable hcloud_token (sensitive) and an hcloud provider; resource hcloud_server.<name> named <name>-${count.index}. With private_network, an hcloud_network.<name> and a cloud hcloud_network_subnet.<name> in network_zone, both covering the range, attached to every server

Field

Required

Default

Example

Options

Description

region

yes

fsn1

size

yes

cx22

os_image

yes

ubuntu-24.04

ubuntu-24.04 (Ubuntu 24.04)
ubuntu-22.04 (Ubuntu 22.04)
debian-12 (Debian 12)
fedora-44 (Fedora 44)
rocky-9 (Rocky Linux 9)
alma-9 (AlmaLinux 9)

Any image slug the provider accepts; the list is a shortcut.

count

no

1

private_network

no

10.10.0.0/16

Format cidr. Private network range for these servers, in CIDR notation. Leave empty to use the provider’s default network.

network_zone

no

eu-central

eu-central (Europe (fsn1, nbg1, hel1))
us-east (US East (ash))
us-west (US West (hil))
ap-southeast (Asia Pacific (sin))

Network zone of the private network; it must contain the server location.

In the app: Provision > Cloud server, then choose Hetzner Cloud Server in Provider. Fields: Name, Region, Size, OS image (with the options above as suggestions), Count, Private network and Network zone.

terraform/aws

Property

Value

Title

AWS EC2 Instance

Description

Terraform for one or more AWS EC2 instances.

Output paths

{{ name }}-aws.tf

Template fallbacks

Declares an aws provider in the chosen region, a data.aws_ami.<name> lookup of the newest image matching os_image from image_owner, and resource aws_instance.<name> tagged <name>-${count.index}. With private_network, an aws_vpc.<name> and an aws_subnet.<name> covering the range, with an internet gateway and a default route, used as each instance’s subnet_id; without it, instances use the default VPC

Field

Required

Default

Example

Options

Description

region

yes

us-east-1

size

yes

t3.small

os_image

yes

ubuntu/images/hvm-ssd-gp3/ubuntu-noble-24.04-amd64-server-*

ubuntu/images/hvm-ssd-gp3/ubuntu-noble-24.04-amd64-server-* (Ubuntu 24.04)
ubuntu/images/hvm-ssd/ubuntu-jammy-22.04-amd64-server-* (Ubuntu 22.04)

Any image slug the provider accepts; the list is a shortcut.

count

no

1

private_network

no

10.10.0.0/16

Format cidr. Private network range for these servers, in CIDR notation. Leave empty to use the provider’s default network.

image_owner

no

099720109477

AWS account that publishes the image; 099720109477 is Canonical.

In the app: Provision > Cloud server, then choose AWS EC2 Instance in Provider. Fields: Name, Region, Size, OS image (with the options above as suggestions), Count, Private network and Image owner.

terraform/google

Property

Value

Title

Google Compute Engine Instance

Description

Terraform for one or more Google Compute Engine instances.

Output paths

{{ name }}-google.tf

Template fallbacks

Declares a google provider for project in the zone given as region, and resource google_compute_instance.<name> named <name>-${count.index} on the default network with a public IP. With private_network, a google_compute_network.<name> without automatic subnets and a google_compute_subnetwork.<name> with that ip_cidr_range in the zone’s region, used instead of the default network

Field

Required

Default

Example

Options

Description

region

yes

europe-west1-b

size

yes

e2-medium

os_image

yes

ubuntu-os-cloud/ubuntu-2404-lts-amd64

ubuntu-os-cloud/ubuntu-2404-lts-amd64 (Ubuntu 24.04)
ubuntu-os-cloud/ubuntu-2204-lts (Ubuntu 22.04)
debian-cloud/debian-12 (Debian 12)
rocky-linux-cloud/rocky-linux-9 (Rocky Linux 9)

Any image slug the provider accepts; the list is a shortcut.

count

no

1

private_network

no

10.10.0.0/16

Format cidr. Private network range for these servers, in CIDR notation. Leave empty to use the provider’s default network.

project

yes

my-project

In the app: Provision > Cloud server, then choose Google Compute Engine Instance in Provider. Fields: Name, Region, Size, OS image (with the options above as suggestions), Count, Private network and Project.

terraform/scaleway

Property

Value

Title

Scaleway Instance

Description

Terraform for one or more Scaleway instances with public IPs.

Output paths

{{ name }}-scaleway.tf

Template fallbacks

Requires the scaleway/scaleway provider in the zone given as region; resources scaleway_instance_ip.<name> and scaleway_instance_server.<name> named <name>-${count.index}. With private_network, a scaleway_vpc_private_network.<name> with that IPv4 subnet in the zone’s region, attached to every server

Field

Required

Default

Example

Options

Description

region

yes

fr-par-1

size

yes

DEV1-S

os_image

yes

ubuntu_noble

ubuntu_noble (Ubuntu 24.04)
ubuntu_jammy (Ubuntu 22.04)
debian_bookworm (Debian 12)
rockylinux_9 (Rocky Linux 9)

Any image slug the provider accepts; the list is a shortcut.

count

no

1

private_network

no

10.10.0.0/16

Format cidr. Private network range for these servers, in CIDR notation. Leave empty to use the provider’s default network.

In the app: Provision > Cloud server, then choose Scaleway Instance in Provider. Fields: Name, Region, Size, OS image (with the options above as suggestions), Count and Private network.

terraform/linode

Property

Value

Title

Linode Instance

Description

Terraform for one or more Linode instances.

Output paths

{{ name }}-linode.tf

Template fallbacks

Requires the linode/linode provider and declares variables linode_token (sensitive) and ssh_public_key; resource linode_instance.<name> labelled <name>-${count.index}. With private_network, a linode_vpc.<name> and a linode_vpc_subnet.<name> with that ipv4 range; each instance gets a public interface and one in the subnet

Field

Required

Default

Example

Options

Description

region

yes

eu-central

size

yes

g6-standard-1

os_image

yes

linode/ubuntu24.04

linode/ubuntu24.04 (Ubuntu 24.04)
linode/ubuntu22.04 (Ubuntu 22.04)
linode/debian12 (Debian 12)
linode/rocky9 (Rocky Linux 9)

Any image slug the provider accepts; the list is a shortcut.

count

no

1

private_network

no

10.10.0.0/16

Format cidr. Private network range for these servers, in CIDR notation. Leave empty to use the provider’s default network.

In the app: Provision > Cloud server, then choose Linode Instance in Provider. Fields: Name, Region, Size, OS image (with the options above as suggestions), Count and Private network.

ansible/k8s-bootstrap

Property

Value

Title

Kubernetes Bootstrap

Description

Installs containerd, kubelet, kubeadm and kubectl on target hosts.

Output paths

{{ name }}-k8s-bootstrap.yml

Template fallbacks

Installs containerd, then kubelet, kubeadm and kubectl pinned to <k8s_version>* with apt, become: true

Field

Required

Default

Example

Options

Description

hosts

yes

An inventory group, or all.

k8s_version

yes

1.31

In the app: Configure > Show more > Kubernetes Bootstrap. Fields: Name, Hosts (suggests all and the inventory groups) and Kubernetes version.

ansible/inventory

Property

Value

Title

Inventory

Description

Hosts, groups, nesting and shared vars for servers you already have.

Output paths

{{ name }}-inventory.ini

JSON-valued fields

hosts

Field

Required

Default

Example

Options

Description

hosts

yes

default_user

no

root

SSH user written for hosts that don’t set one (null on a host omits it).

default_port

no

22

SSH port written for hosts that don’t set one (null on a host omits it).

In the app: Inventory > Inventory. Fields: Name, then Hosts with one row per host (Host name, Address, Groups, and under Connection & host vars: SSH user, SSH port, SSH key file and Host vars), then Groups with Group name, Child groups and Group vars. Import inventory.ini fills both from an existing file. The app builds hosts for you and has no fields for default_user and default_port: leave SSH user and SSH port empty on a host to inherit them from a group’s vars. See Import an existing Ansible inventory.

ansible/group-vars

Property

Value

Title

Group vars

Description

Variables for one inventory group.

Output paths

group_vars/{{ group }}{% if layout == "dir" %}/main{% endif %}.yml

Template fallbacks

yaml non-empty: vars is ignored

JSON-valued fields

vars

Field

Required

Default

Example

Options

Description

group

yes

vars

no

JSON map of simple key/value pairs.

yaml

no

Raw YAML body, written as-is.

layout

no

file

file (group_vars/.yml)
dir (group_vars//main.yml)

In the app: Inventory > Group vars. Fields: Group (suggests the inventory groups), Folder layout (ticked writes the dir layout) and Variables, edited as Key / value (vars) or YAML (yaml). The component takes its name from the group. See Manage group vars as YAML or a folder.

ansible/common-role

Property

Value

Title

Common role

Description

A starter host-hygiene role: base packages, timezone, swap, a templated motd.

Output paths

roles/{{ name }}/tasks/main.yml
roles/{{ name }}/defaults/main.yml
roles/{{ name }}/handlers/main.yml
roles/{{ name }}/templates/motd.j2

Template fallbacks

defaults/main.yml sets motd_message: "Managed by kikx"; the timezone task uses community.general.timezone

Field

Required

Default

Example

Options

Description

timezone

no

UTC

In the app: Configure > Show more > Common role. Fields: Name and Timezone.

ansible/role

Property

Value

Title

Role skeleton

Description

An empty role (tasks, defaults, handlers, meta) to fill in.

Output paths

roles/{{ name }}/tasks/main.yml
roles/{{ name }}/defaults/main.yml
roles/{{ name }}/handlers/main.yml
roles/{{ name }}/meta/main.yml

Template fallbacks

description empty: meta/main.yml uses The <name> role; defaults/main.yml sets <name>_enabled: true with - replaced by _

Field

Required

Default

Example

Options

Description

description

no

""

In the app: Configure > Role skeleton. Fields: Name and Description. Checks can also create role skeletons for the roles your playbooks use; see Scaffold the roles your playbooks use.

ansible/playbook

Property

Value

Title

Playbook

Description

One or more plays, each running roles on an inventory group.

Output paths

{% if folder %}{{ folder }}/{% endif %}{{ name }}.yml

Template fallbacks

plays non-empty: hosts and roles are ignored; see plays

JSON-valued fields

plays, roles

Field

Required

Default

Example

Options

Description

hosts

no

roles

no

plays

no

JSON list of plays: name, hosts, become, tags, roles, pre_tasks, post_tasks.

folder

no

playbooks

Where the file goes. Leave empty for the project root.

In the app: Configure > Playbook. Fields: Name, Folder, then one card per play under Plays (Add play): Name, Runs on (hosts), Roles, in the order they run, Role conditions (when:), Pre-tasks & post-tasks, Tags (optional) and Run as root (become). The app always writes plays; it doesn’t use the legacy hosts and roles fields. See Write a multi-play playbook with role conditions.

ansible/site

Property

Value

Title

Site playbook

Description

The entry point that imports your playbooks in order.

Output paths

{{ name }}.yml

JSON-valued fields

playbooks

Field

Required

Default

Example

Options

Description

playbooks

yes

In the app: Configure > Site playbook. Fields: Name, then Imports, in run order: one row per import with Import name and Playbook path. Click a playbook next to from this project:, or Add all, to add rows for the project’s playbooks; Add path adds an empty row. See Wire playbooks together with a site playbook.

ansible/config

Property

Value

Title

Ansible config

Description

ansible.cfg pointing Ansible at your inventory and roles, so playbooks in subfolders find them.

Output paths

ansible.cfg

Template fallbacks

inventory empty: no inventory line. The component name is not used in the output

Field

Required

Default

Example

Options

Description

inventory

no

platform-inventory.ini

roles_path

no

roles

In the app: Configure > Show more > Ansible config. Fields: Name, Inventory file and Roles path.

Example: inventory=platform-inventory.ini writes ansible.cfg:

[defaults]
inventory = platform-inventory.ini
roles_path = roles

Ansible reads ansible.cfg from the directory it is run in. From the output directory, ansible-playbook site.yml then uses that inventory without -i, and finds roles in roles/ even for playbooks in a subfolder such as playbooks/.

JSON field shapes

A field value whose first non-whitespace character is [ or { and that parses as JSON is passed to the template as a list or map. Any other value, including invalid JSON, is passed as a string. Object keys are iterated in alphabetical order.

hosts

Field of ansible/inventory. A JSON array of group objects, written in array order.

Key

Type

Written as

group

string

Section name [<group>], [<group>:children], [<group>:vars]

members

array of host objects

[<group>] section, one line per host. Omitted when missing or empty

children

array of strings

[<group>:children] section, one group name per line. Omitted when missing or empty

vars

object

[<group>:vars] section, one key=value line per key. Omitted when missing or empty

Host object:

Key

Type

Written as

name

string

First token of the host line

ansible_host

string

ansible_host=<value> when non-empty

ansible_user

string or null

See Missing, null and empty

ansible_port

number, string or null

See Missing, null and empty

ssh_key_file

string

ansible_ssh_private_key_file=<value> when non-empty

vars

object

key=value per key, after all other tokens

A host listed under several groups is written in each of those groups.

Missing, null and empty

ansible_user on the host

Written

key missing

ansible_user=<default_user>, or nothing when default_user is empty

null, "" or false

nothing

non-empty value

ansible_user=<value>

ansible_port follows the same rules with default_port.

Example value:

[
  {"group": "web", "members": [
    {"name": "web-01", "ansible_host": "192.0.2.10"},
    {"name": "web-02", "ansible_host": "192.0.2.11", "ansible_user": null, "ansible_port": null},
    {"name": "web-03", "ansible_host": "192.0.2.12", "ansible_user": "deploy", "ansible_port": 2222,
     "ssh_key_file": "~/.ssh/id_ed25519", "vars": {"http_port": 8080}}
  ], "vars": {"ntp": "pool.ntp.org"}},
  {"group": "db", "members": [{"name": "db-01", "ansible_host": "198.51.100.5", "ansible_user": ""}]},
  {"group": "platform", "children": ["web", "db"], "vars": {"env": "prod"}}
]

Output with the default default_user and default_port:

[web]
web-01 ansible_host=192.0.2.10 ansible_user=root ansible_port=22
web-02 ansible_host=192.0.2.11
web-03 ansible_host=192.0.2.12 ansible_user=deploy ansible_port=2222 ansible_ssh_private_key_file=~/.ssh/id_ed25519 http_port=8080

[web:vars]
ntp=pool.ntp.org

[db]
db-01 ansible_host=198.51.100.5 ansible_port=22

[platform:children]
web
db

[platform:vars]
env=prod

vars, yaml and layout

Fields of ansible/group-vars.

Field

Shape

Written as

vars

JSON object

One key: value line per key

yaml

string

Written as is, with leading and trailing whitespace trimmed. When non-empty, vars is ignored

layout

file or dir

dir: group_vars/<group>/main.yml. Any other value: group_vars/<group>.yml

The path uses the group field, not the component name.

Example: group=db, vars={"pg_version":16,"pg_port":5432} writes group_vars/db.yml:

pg_port: 5432
pg_version: 16

plays

Field of ansible/playbook. A JSON array of play objects, written in order and separated by a blank line.

Key

Type

Default

Written as

name

string

component name

- name: <value>

hosts

string

hosts: <value>, verbatim

become

boolean

true

become: true when missing or truthy. No line when false

tags

array of strings

tags: [a, b]. No line when missing or empty

pre_tasks

string of YAML tasks

pre_tasks: block, trimmed and indented by 4 spaces. No block when missing or empty

roles

array of role entries

roles: list

post_tasks

string of YAML tasks

post_tasks: block after roles, trimmed and indented by 4 spaces

Role entry:

Form

Written as

"common"

- common

{"role": "postgres"}

- role: postgres

{"role": "postgres", "when": "<expr>"}

- role: postgres followed by when: <expr>

Example value, with component name data and folder=playbooks:

[
  {"name": "Data tier", "hosts": "db", "become": false, "tags": ["data", "db"],
   "roles": ["common", {"role": "postgres", "when": "inventory_hostname == groups[\"db\"][0]"}],
   "pre_tasks": "- name: Wait\n  ansible.builtin.wait_for_connection:\n",
   "post_tasks": "- name: Done\n  ansible.builtin.debug:\n    msg: ok\n"},
  {"hosts": "web", "roles": ["nginx"]}
]

Output, playbooks/data.yml:

- name: Data tier
  hosts: db
  tags: [data, db]
  pre_tasks:
    - name: Wait
      ansible.builtin.wait_for_connection:
  roles:
    - common
    - role: postgres
      when: inventory_hostname == groups["db"][0]
  post_tasks:
    - name: Done
      ansible.builtin.debug:
        msg: ok

- name: data
  hosts: web
  become: true
  roles:
    - nginx

Legacy hosts and roles

Fields of ansible/playbook, used when plays is missing or empty. They produce one play named after the component, with become: true.

Field

Shape

hosts

string

roles

JSON array of role names

Example: component name legacy, hosts=web, roles=["common","nginx"] writes legacy.yml:

- name: legacy
  hosts: web
  become: true
  roles:
    - common
    - nginx

plays covers everything this form does, plus names, tags, role conditions and several plays per file. Prefer it for new playbooks.

playbooks

Field of ansible/site. A JSON array of objects, written in order.

Key

Type

Written as

name

string

- name: <value>

path

string

import_playbook: <value>

Example: [{"name":"Data","path":"playbooks/data.yml"},{"name":"Legacy","path":"legacy.yml"}] writes:

- name: Data
  import_playbook: playbooks/data.yml
- name: Legacy
  import_playbook: legacy.yml

See also