Skip to content
Talk to our solutions team

Infrastructure

Provisioning and operating infrastructure: services, processes, cron, ports and users. Every parameter with its type, default and description, plus worked examples.

AWS EC2 instance management with reboot, start/stop, and terminate operations.

ParameterTypeRequiredDefaultDescription
commandstringYesOperation: reboot, start_stop, terminate
idstringYesEC2 instance ID
dryrunboolNofalsePerform a dry run (AWS DryRun flag)

The task also requires an environment configuration with AWS credentials and region settings.

CommandDescription
rebootReboot an EC2 instance
start_stopStart or stop an EC2 instance
terminateTerminate an EC2 instance
tasks:
- name: reboot-instance
infra:
command: reboot
id: "i-0123456789abcdef0"
tasks:
- name: terminate-instance
infra:
command: terminate
id: "i-0123456789abcdef0"
tasks:
- name: test-reboot
infra:
command: reboot
id: "i-0123456789abcdef0"
dryrun: true

OS service management with list, status, start, stop, restart, enable, disable, and create operations. Cross-platform support for systemd (Linux), launchd (macOS), and sc.exe (Windows).

ParameterTypeRequiredDefaultDescription
actionstringYesOperation to perform (see Actions)
namestringYes*Service name
filterstringNoSubstring filter for list action
descriptionstringNoHuman-readable description (create)
commandstringYes**Executable path (create)
args[]mapNoCommand arguments (create)
workdirstringNoWorking directory (create)
userstringNoOS user to run service as (create)
start_typestringNoautoStart type: auto, manual, disabled (create)
environment[]mapNoEnvironment variables as key/value pairs (create)
restart_policystringNoon-failureRestart policy: always, on-failure, no (create)
restart_secintNo5Seconds before restart (create)
after[]mapNoService dependencies (create)
enable_on_createboolNotrueEnable service after creation
start_on_createboolNotrueStart service after creation

* Required for all actions except list. ** Required for create.

ActionDescription
listList all services (optionally filtered)
statusCheck service status
startStart a service
stopStop a service
restartRestart a service
enableEnable a service for automatic startup
disableDisable a service from automatic startup
createCreate a new service unit
tasks:
- name: list-services
service:
action: list
tasks:
- name: find-nginx
service:
action: list
filter: nginx
tasks:
- name: check-nginx
service:
action: status
name: nginx
tasks:
- name: start-nginx
service:
action: start
name: nginx
tasks:
- name: stop-nginx
service:
action: stop
name: nginx
tasks:
- name: restart-nginx
service:
action: restart
name: nginx
tasks:
- name: enable-nginx
service:
action: enable
name: nginx
- name: disable-nginx
service:
action: disable
name: nginx
tasks:
- name: create-myapp
service:
action: create
name: myapp
description: "My Application Service"
command: /usr/local/bin/myapp
args:
- value: "--port"
- value: "8080"
tasks:
- name: create-webapp
service:
action: create
name: webapp
description: "Web Application Server"
command: /opt/webapp/bin/server
args:
- value: "--config"
- value: "/etc/webapp/config.yaml"
workdir: /opt/webapp
user: www-data
start_type: auto
restart_policy: always
restart_sec: 10
environment:
- key: NODE_ENV
value: production
- key: PORT
value: "3000"
after:
- value: network.target
- value: postgresql.service
tasks:
- name: create-worker
service:
action: create
name: worker
description: "Background Worker"
command: /opt/worker/bin/worker
start_type: manual
enable_on_create: true
start_on_create: false
vars:
service_name: nginx
tasks:
- name: check-service
service:
action: status
name: "{{service_name}}"
- name: restart-service
service:
action: restart
name: "{{service_name}}"
vars:
app_name: myapi
app_binary: /opt/myapi/bin/server
app_port: "9090"
app_dir: /opt/myapi
tasks:
- name: create-api-service
service:
action: create
name: "{{app_name}}"
description: "API Service for {{app_name}}"
command: "{{app_binary}}"
args:
- value: "--port"
- value: "{{app_port}}"
workdir: "{{app_dir}}"
user: www-data
restart_policy: on-failure
restart_sec: 5

OS process management with list, check, kill, find, and start operations. Cross-platform support.

ParameterTypeRequiredDefaultDescription
actionstringYesOperation: list, check, kill, find, start
namestringNoProcess name or pattern
pidintNoProcess ID
signalstringNoKILLSignal to send (kill)
commandstringNoCommand to run (start)
args[]mapNoCommand arguments (start)
workdirstringNoWorking directory (start)
backgroundboolNofalseRun in background (start)

All string parameters support Liquid template variables.

ActionDescription
listList running processes (optionally filtered by name)
checkCheck if a process is running (by name or PID)
killKill a process (by name or PID, with signal)
findFind processes matching a name pattern
startStart a new process (foreground or background)
tasks:
- name: list-processes
process:
action: list
tasks:
- name: find-nginx
process:
action: list
name: nginx
tasks:
- name: check-nginx
process:
action: check
name: nginx
tasks:
- name: check-pid
process:
action: check
pid: 1234
tasks:
- name: kill-nginx
process:
action: kill
name: nginx
tasks:
- name: graceful-stop
process:
action: kill
pid: 1234
signal: TERM
tasks:
- name: find-matching
process:
action: find
name: nginx
tasks:
- name: run-migration
process:
action: start
command: /usr/bin/python3
args:
- value: manage.py
- value: migrate
workdir: /opt/app
tasks:
- name: start-server
process:
action: start
command: /usr/local/bin/myserver
args:
- value: "--port"
- value: "8080"
background: true
vars:
service_name: nginx
kill_signal: TERM
tasks:
- name: check-service
process:
action: check
name: "{{service_name}}"
- name: stop-service
process:
action: kill
name: "{{service_name}}"
signal: "{{kill_signal}}"
- name: verify-stopped
process:
action: check
name: "{{service_name}}"
vars:
app_cmd: /opt/app/server
app_port: "3000"
app_dir: /opt/app
tasks:
- name: start-app
process:
action: start
command: "{{app_cmd}}"
args:
- value: "--port"
- value: "{{app_port}}"
workdir: "{{app_dir}}"
background: true

Scheduled job management with support for recurring and one-time jobs, execution, logging, and OS scheduler sync.

ParameterTypeRequiredDefaultDescription
actionstringYesOperation to perform (see Actions)
namestringYes*Job name
commandstringYes**Command to execute
schedulestringYes***Schedule expression (human-friendly or cron)
timestringYes****Time for one-time jobs (now, in 5 minutes, today at 3pm)
dirstringNoWorking directory for job execution
shellstringNo/bin/shShell to use
env[]mapNoEnvironment variables (key/value pairs)
timeoutstringNoJob timeout as duration (30m, 1h)
overlapstringNoConcurrent execution: skip, queue, allow
enabledboolNotrueWhether job is active
linesintNo50Number of lines for logs/history
directionstringNobothSync direction: to-os, from-os, both
dry_runboolNofalsePreview sync changes without applying

* Required for all actions except list and sync. ** Required for add and once. *** Required for add. **** Required for once.

ActionDescription
addAdd a recurring scheduled job
onceSchedule a one-time job
removeRemove a job
listList all managed jobs
showShow details of a specific job
execExecute a job immediately (foreground)
runRun a job in the background
logsView job log output
historyView job execution history
syncSync between YAML store and OS scheduler

The schedule parameter accepts both human-friendly expressions and raw cron syntax:

FormatExample
Human-friendlydaily at 2am, weekly on monday at 9am, every 5 minutes
Raw croncron */5 * * * *, cron 0 2 * * *
tasks:
- name: add-backup
cron:
action: add
name: daily-backup
command: /opt/scripts/backup.sh
schedule: daily at 2am
dir: /opt/backup
timeout: 1h
env:
- key: BACKUP_DIR
value: /mnt/backups
enabled: true
tasks:
- name: add-health-check
cron:
action: add
name: health-check
command: curl -sf http://localhost:8080/health
schedule: cron */5 * * * *
timeout: 30s
tasks:
- name: run-deployment
cron:
action: once
name: deploy-v2
command: /opt/scripts/deploy.sh --version v2.0.0
time: today at 11pm
dir: /opt/app
tasks:
- name: run-now
cron:
action: once
name: db-migrate
command: /opt/scripts/migrate.sh
time: now
tasks:
- name: list-jobs
cron:
action: list
tasks:
- name: show-details
cron:
action: show
name: daily-backup
tasks:
- name: run-foreground
cron:
action: exec
name: daily-backup
tasks:
- name: run-background
cron:
action: run
name: daily-backup
tasks:
- name: view-logs
cron:
action: logs
name: daily-backup
lines: 100
tasks:
- name: view-history
cron:
action: history
name: daily-backup
lines: 20
tasks:
- name: remove-job
cron:
action: remove
name: health-check
tasks:
- name: sync-jobs
cron:
action: sync
direction: to-os
tasks:
- name: preview-sync
cron:
action: sync
direction: both
dry_run: true
vars:
env_name: production
report_email: [email protected]
tasks:
- name: add-weekly-report
cron:
action: add
name: "weekly-report-{{ env_name }}"
command: "/opt/scripts/report.sh --env {{ env_name }}"
schedule: weekly on monday at 9am
env:
- key: REPORT_EMAIL
value: "{{ report_email }}"

Scheduled job management functions.

Scope: System

FunctionDescription
cron.add()Add a recurring scheduled job
cron.once()Schedule a one-time job
cron.remove()Remove a job
cron.list()List all managed jobs
cron.show()Show job details
cron.exec()Execute a job in foreground
cron.run()Run a job in background
cron.logs()View job log output
cron.history()View job execution history
cron.sync()Sync with OS scheduler

See the cron namespace documentation for detailed per-function parameters, returns, and examples.

Unified TCP/UDP port management with check, find, list, and kill operations.

ParameterTypeRequiredDefaultDescription
actionstringYesOperation: check, find, list, kill
portstringYes*Target port number
startportstringNo3000Range start (find)
endportstringNo65000Range end (find)
incrementstringNo1000Step size (find)
minportstringNo10000Skip ports below this value (find)
protocolstringNotcpProtocol: tcp or udp
signalstringNoKILLSignal to send (kill)
setstringNobaseportOutput variable name for found port (find)

*Port is required for check, list, and kill. All string values support Liquid templates.

ActionDescription
checkCheck if a port is free
findFind the first free port in a range
listList processes using a port
killKill all processes on a port
tasks:
- name: verify-port
port:
action: check
port: "8080"

Scans from startport to endport in steps of increment, skipping ports below minport. The found port is stored in the variable specified by set.

tasks:
- name: find-port
port:
action: find
startport: "10000"
endport: "60000"
increment: "1000"
set: baseport
tasks:
- name: show-processes
port:
action: list
port: "8080"
tasks:
- name: free-port
port:
action: kill
port: "8080"
signal: TERM
vars:
target_port: "8080"
tasks:
- name: check-port
port:
action: check
port: "{{target_port}}"

TCP/UDP port management functions.

Scope: System

FunctionDescription
port.check()Check if a port is free
port.find()Find the first free port in a range
port.list()List processes using a port
port.kill()Kill all processes on a port

Check if a TCP/UDP port is free.

Input: int (port number) or map with keys: port, protocol

Returns:

FieldTypeDescription
successboolWhether the check succeeded
freeboolWhether the port is free
errorstringError message if failed
// Simple check with port number
let result = port.check(8080)
if (result.free) {
log("Port 8080 is available")
}
// Check with protocol
let result = port.check({ port: 3000, protocol: "udp" })
log("Free: " + result.free)

Find the first free port in a range.

Input: map with keys: startport, endport, increment, minport, protocol

Returns:

FieldTypeDescription
successboolWhether a free port was found
portintThe free port number
errorstringError message if failed
// Find free port in range
let result = port.find({
startport: 10000,
endport: 60000,
increment: 100
})
log("Free port: " + result.port)
// Find with minimum port
let result = port.find({
startport: 3000,
endport: 65000,
increment: 1000,
minport: 10000
})

List processes using a port.

Input: int (port number) or map with keys: port, protocol

Returns:

FieldTypeDescription
successboolWhether the listing succeeded
processesarrayArray of process objects with pid, user, command
errorstringError message if failed
// List processes on a port
let result = port.list(8080)
for (let p of result.processes) {
log(p.pid + " " + p.user + " " + p.command)
}

Kill all processes on a port.

Input: int (port number) or map with keys: port, protocol, signal

Returns:

FieldTypeDescription
successboolWhether the kill succeeded
freeboolWhether the port is now free
errorstringError message if failed
// Kill with default signal (KILL)
port.kill(8080)
// Graceful termination
port.kill({ port: 8080, signal: "TERM" })
// Kill UDP port processes
port.kill({ port: 5353, protocol: "udp", signal: "TERM" })

OS user management with check, create, delete, modify, and password operations.

ParameterTypeRequiredDefaultDescription
actionstringYesOperation: check, create, delete, modify, passwd
usernamestringYesTarget OS username
groupnamestringNoPrimary group name
shellstringNo/bin/bashLogin shell path
homestringNoHome directory path
groups[]stringNoSupplementary groups
passwordstringNoUser password (plain text)
createhomeboolNotrueCreate home directory
removehomeboolNofalseRemove home directory on deletion
systemboolNofalseCreate as system account

All string parameters support Liquid template variables.

ActionDescription
checkCheck if a user exists (returns uid, gid, homedir)
createCreate a new OS user
deleteDelete an OS user
modifyModify user properties
passwdSet or change a user password
tasks:
- name: verify-user
user:
action: check
username: "{{target_user}}"
tasks:
- name: create-app-user
user:
action: create
username: appuser
groupname: appgroup
groups:
- docker
- sudo
tasks:
- name: create-system-user
user:
action: create
username: myservice
system: true
createhome: false
shell: /usr/sbin/nologin
tasks:
- name: remove-user
user:
action: delete
username: olduser
removehome: true
tasks:
- name: update-groups
user:
action: modify
username: appuser
groups:
- docker
- sudo
- adm
tasks:
- name: set-password
user:
action: passwd
username: "{{target_user}}"
password: "{{user_password}}"

OS user management functions.

Scope: System

FunctionDescription
user.check()Check if a user exists
user.create()Create a new user
user.delete()Delete a user
user.modify()Modify user properties
user.passwd()Set or change a user password

Check if an OS user exists.

Input: string (username) or map with key: username

Returns:

FieldTypeDescription
successboolWhether the check succeeded
existsboolWhether the user exists
uidstringUser’s numeric UID
gidstringUser’s numeric GID
homedirstringUser’s home directory
errorstringError message if failed
// Simple check with username string
let result = user.check("deploybot")
if (result.exists) {
log("UID: " + result.uid)
log("Home: " + result.homedir)
}

Create a new OS user.

Input: string (username) or map with keys: username, groupname, shell, home, groups, createhome, system

Returns:

FieldTypeDescription
successboolWhether the user was created
errorstringError message if failed
// Simple create
user.create("deploybot")
// Create with options
user.create({
username: "deploybot",
groupname: "deploy",
groups: ["docker", "sudo"],
shell: "/bin/bash"
})
// Create system account
user.create({
username: "myservice",
system: true,
createhome: false
})

Delete an OS user.

Input: string (username) or map with keys: username, removehome

Returns:

FieldTypeDescription
successboolWhether the user was deleted
errorstringError message if failed
// Simple delete
user.delete("olduser")
// Delete with home directory removal
user.delete({ username: "olduser", removehome: true })

Modify OS user properties.

Input: map with keys: username, groupname, shell, home, groups

Returns:

FieldTypeDescription
successboolWhether the modification succeeded
errorstringError message if failed
user.modify({
username: "deploybot",
groups: ["docker", "sudo", "adm"],
shell: "/bin/zsh"
})

Set or change a user password.

Input: map with keys: username, password

Returns:

FieldTypeDescription
successboolWhether the password was set
errorstringError message if failed
user.passwd({
username: "deploybot",
password: "new-password-123"
})
// Check if user exists, create if not
let result = user.check("deploybot")
if (!result.exists) {
user.create({
username: "deploybot",
groupname: "deploy",
groups: ["docker", "sudo"],
shell: "/bin/bash"
})
user.passwd({
username: "deploybot",
password: "initial123"
})
}
// Modify existing user
user.modify({
username: "deploybot",
groups: ["docker", "sudo", "adm"]
})

Reads an application manifest and assigns static ports for product deployment. Computes port assignments starting at baseport + 251, incrementing by 100 for each application.

ParameterTypeRequiredDefaultDescription
customernamestringYesCustomer name
productnamestringYesProduct name
environmentnamestringYesEnvironment name
  • An apps.yaml file must exist at the environment’s product path
  • A baseport variable must be set in the environment context (integer)

The task reads from:

/home/environmentuser/environments/{customer}/{environment}/products/{product}/apps/apps.yaml

Sets appdomains in the workflow context with the selected applications and their assigned static ports.

tasks:
- name: deploy-product
deployproduct:
customername: acme
productname: webapp
environmentname: production
vars:
customer: "{{customer_name}}"
product: "{{product_name}}"
env: "{{environment_name}}"
tasks:
- name: deploy-product
deployproduct:
customername: "{{customer}}"
productname: "{{product}}"
environmentname: "{{env}}"

Template application, SQL DDL conversion, and error code extraction utilities.

Parameters vary by action.

ParameterTypeRequiredDefaultDescription
actionstringYesOperation: apply-template, sql-to-yaml, error-json
ParameterTypeRequiredDefaultDescription
templatetypestringYesTemplate type: app, template, plugin
templateslugstringYesTemplate slug with optional version ([email protected])
urlstringYesBrahma artifact service URL
destinationstringYesOutput directory
namestringNoOverride default folder name
checkIfExistsstringNoVerify template exists before download
ParameterTypeRequiredDefaultDescription
inputpathstringYesPath to SQL DDL file
outputpathstringYesOutput directory or file path
dbtypestringYesDatabase type (postgres, mysql)
yamlnamestringNoOutput YAML file name
referencenamestringNoName for references output file
yamlperentityboolNofalseCreate one file per entity
fileprefixstringNoPrefix for per-entity files
ParameterTypeRequiredDefaultDescription
servicestringYesService name prefix for error codes
pathstringYesPath to Go source file containing error definitions
outputstringYesPath for generated JSON output
ActionDescription
apply-templateDownload and apply a Brahma template
sql-to-yamlConvert SQL DDL to YAML entity definitions
error-jsonExtract error codes from Go source to JSON
tasks:
- name: apply-template
scaffold:
action: apply-template
templatetype: app
templateslug: "[email protected]"
url: "https://brahma.example.com"
destination: "/opt/output"
name: "my-project"
vars:
project_name: my-service
app_slug: "my-template@latest"
tasks:
- name: apply-template
scaffold:
action: apply-template
templatetype: template
templateslug: "{{app_slug}}"
url: "https://brahma.example.com"
destination: "/opt/output"
name: "{{project_name}}"
checkIfExists: "true"
tasks:
- name: apply-plugin
scaffold:
action: apply-template
templatetype: plugin
templateslug: "[email protected]"
url: "https://brahma.example.com"
destination: "/opt/plugins"
tasks:
- name: convert-sql
scaffold:
action: sql-to-yaml
inputpath: "/data/schema.sql"
outputpath: "/data/output/schema.yaml"
dbtype: postgres

Convert SQL with entity/reference splitting

Section titled “Convert SQL with entity/reference splitting”
tasks:
- name: convert-with-refs
scaffold:
action: sql-to-yaml
inputpath: "/data/schema.sql"
outputpath: "/data/output"
dbtype: mysql
yamlname: entities
referencename: references
tasks:
- name: per-entity
scaffold:
action: sql-to-yaml
inputpath: "/data/schema.sql"
outputpath: "/data/output"
dbtype: postgres
yamlperentity: true
fileprefix: "ds"
referencename: "references"
vars:
sql_file: /data/tables.sql
output_dir: /data/yaml
db: postgres
tasks:
- name: convert
scaffold:
action: sql-to-yaml
inputpath: "{{sql_file}}"
outputpath: "{{output_dir}}"
dbtype: "{{db}}"
yamlperentity: true
tasks:
- name: generate-errors
scaffold:
action: error-json
service: "myservice-"
path: "/opt/myservice/errors/errors.go"
output: "/opt/myservice/errors.json"
vars:
svc_name: "myservice-"
errors_file: /opt/myservice/errors/errors.go
output_file: /opt/myservice/errors.json
tasks:
- name: generate-errors
scaffold:
action: error-json
service: "{{svc_name}}"
path: "{{errors_file}}"
output: "{{output_file}}"

Kong API Gateway declarative YAML configuration management with service, certificate, and route operations. Also supports certificate expiry checking and ACME renewal.

ParameterTypeRequiredDefaultDescription
actionstringYesOperation to perform (see Actions)
pathstringYesPath to Kong YAML configuration file
keystringNoTarget name (service name, SNI name)
valuestringNoYAML content or hostname
parsebeforeboolNofalseRender Liquid templates before YAML parsing
commands[]mapNoArray of batch operations (multi-command mode)
expirydurationstringNo168hCertificate expiry look-ahead window
updateemailstringNo[email protected]ACME registration email
dnsproviderstringNogodaddyDNS provider for ACME challenges
forceboolNofalseForce certificate renewal even if not expired
FieldTypeDescription
typestringCommand type (same as action values)
keystringTarget name
valuestringYAML content or hostname
ActionDescription
add-serviceAdd a service to Kong configuration
update-serviceUpdate an existing service by name
remove-serviceRemove a service by name
add-certAdd a TLS certificate
update-certUpdate an existing certificate by SNI name
remove-certRemove a certificate by SNI name
add-service-routeAdd a hostname to a service route
remove-service-routeRemove a hostname from a service route
check-certsCheck certificate expiry status
renew-certsRenew expired certificates via ACME
tasks:
- name: add-service
kong:
action: add-service
path: /opt/kong/kong.yml
value: |
name: "{{env}}-{{username}}-api"
url: "https://localhost:{{baseport}}"
tags:
- https
- "{{env}}-{{username}}"
connect_timeout: 500000
read_timeout: 500000
write_timeout: 500000
routes:
- name: "{{env}}-{{username}}-route"
paths:
- /
protocols:
- http
- https
strip_path: false
tasks:
- name: update-service
kong:
action: update-service
path: /opt/kong/kong.yml
key: "production-myapp-api"
value: |
name: "production-myapp-api"
url: "https://localhost:9090"
read_timeout: 600000
tasks:
- name: remove-service
kong:
action: remove-service
path: /opt/kong/kong.yml
key: "old-service"
tasks:
- name: add-cert
kong:
action: add-cert
path: /opt/kong/kong.yml
parsebefore: true
value: |
cert: "{{domainscert}}"
key: "{{domainskey}}"
snis:
- name: "*.{{envslug}}.{{envdomain}}"
tasks:
- name: update-cert
kong:
action: update-cert
path: /opt/kong/kong.yml
key: "*.example.com"
value: |
cert: "{{new_cert}}"
key: "{{new_key}}"
tasks:
- name: remove-cert
kong:
action: remove-cert
path: /opt/kong/kong.yml
key: "*.old-domain.com"
tasks:
- name: add-route-host
kong:
action: add-service-route
path: /opt/kong/kong.yml
key: "my-service"
value: "newhost.example.com"
tasks:
- name: remove-route-host
kong:
action: remove-service-route
path: /opt/kong/kong.yml
key: "my-service"
value: "oldhost.example.com"

Multiple operations can be performed in a single task using the commands array:

tasks:
- name: batch-edit
kong:
action: add-service
path: /opt/kong/kong.yml
parsebefore: true
commands:
- type: add-service
value: |
name: "new-service"
url: "http://localhost:9090"
routes:
- name: "new-route"
hosts:
- "new.example.com"
- type: remove-service
key: "old-service"
- type: add-service-route
key: "existing-service"
value: "extra-host.example.com"
tasks:
- name: check-certs
kong:
action: check-certs
path: /opt/kong/kong.yml
expiryduration: "168h"
tasks:
- name: renew-certs
kong:
action: renew-certs
path: /opt/kong/kong.yml
updateemail: "[email protected]"
dnsprovider: "godaddy"
force: false
tasks:
- name: force-renew
kong:
action: renew-certs
path: /opt/kong/kong.yml
updateemail: "[email protected]"
dnsprovider: "cloudflare"
force: true
expiryduration: "720h"

CoreDNS zone file management with add and remove record operations. Automatically increments the zone serial number on changes.

ParameterTypeRequiredDefaultDescription
commands[]mapYesArray of DNS record operations
FieldTypeRequiredDescription
pathstringYesPath to the CoreDNS zone file
typestringYesOperation: add-record or remove-record
valuestringYesDNS record as space-separated name ttl type value
ActionDescription
add-recordAdd a DNS record to a zone file
remove-recordRemove a DNS record from a zone file
tasks:
- name: add-dns-record
coredns:
commands:
- path: /etc/coredns/zones/example.com.db
type: add-record
value: "app 3600 A 10.0.1.50"
tasks:
- name: remove-dns-record
coredns:
commands:
- path: /etc/coredns/zones/example.com.db
type: remove-record
value: "old-app 3600 A 10.0.1.50"
tasks:
- name: update-dns
coredns:
commands:
- path: /etc/coredns/zones/example.com.db
type: add-record
value: "web 3600 A 10.0.1.100"
- path: /etc/coredns/zones/example.com.db
type: add-record
value: "api 3600 A 10.0.1.101"
- path: /etc/coredns/zones/example.com.db
type: remove-record
value: "legacy 3600 A 10.0.1.10"
vars:
zone_file: /etc/coredns/zones/example.com.db
app_ip: "10.0.1.50"
tasks:
- name: add-app-record
coredns:
commands:
- path: "{{zone_file}}"
type: add-record
value: "app 3600 A {{app_ip}}"

Retrieves credentials from a credential provider for use in workflows. Supports Git, SSH, and Database credential types.

ParameterTypeRequiredDefaultDescription
credentialnamestringYesName of the credential to retrieve
credentialtypestringYesCredential type: git, ssh, database
setkeystringNoVariable key to store the credential in workflow context
TypeDescription
gitGit repository credentials (URL-based)
sshSSH connection credentials (host-based)
databaseDatabase connection credentials (host-based)

When setkey is provided, the retrieved credential is stored as a JSON-marshaled value in the workflow context under the specified key for use by downstream tasks.

tasks:
- name: get-git-creds
credential-provider:
credentialname: github-deploy
credentialtype: git
setkey: git_credentials
tasks:
- name: get-ssh-creds
credential-provider:
credentialname: production-server
credentialtype: ssh
setkey: ssh_credentials
tasks:
- name: get-db-creds
credential-provider:
credentialname: postgres-main
credentialtype: database
setkey: db_credentials