Attribute Injection Example

This page demonstrates how AsciiDoc attribute injection works in Showroom. The values shown below are resolved from content/antora.yml attributes during local development, and from user_data at deploy time.

Environment Info

Attribute Rendered Value

guid

abc123

bastion_public_hostname

bastion.abc123.ocpv00.rhdp.net

bastion_ssh_user_name

lab-user

bastion_ssh_password

password

openshift_console_url

https://console-openshift-console.apps.cluster-abc123.ocpv00.rhdp.net

openshift_cluster_ingress_domain

apps.cluster-abc123.ocpv00.rhdp.net

showroom-collection-version

v1.5.6

Copyable Command Blocks

Use subs="attributes" on source blocks to inject values into commands your users can copy-paste.

SSH to the Bastion

ssh lab-user@bastion.abc123.ocpv00.rhdp.net

Password: password

Open the OpenShift Console

Visit the console at:

curl an App on the Cluster

curl -sk https://my-app.apps.cluster-abc123.ocpv00.rhdp.net/api/health

Inline Usage

You can reference attributes inline in regular prose. Your environment GUID is abc123 and the bastion is reachable at bastion.abc123.ocpv00.rhdp.net.

How It Works

In your AsciiDoc source, you write attribute references with curly braces:

ssh \{bastion_ssh_user_name}@\{bastion_public_hostname}

At build time, Antora replaces them with the values defined in content/antora.yml (local dev) or injected from user_data (deployed environment).

Always provide sensible defaults in content/antora.yml so your content renders correctly during local development. See User Data and Variables for the full injection flow.