Skip to content

log

Display messages and structured data to the user

Properties

Property Type Required Description
budget integer No Max bytes of rendered output; 0 disables truncation
data any No Structured payload to render
format string No Render format for Data (default: kv) (allowed: kv, json)
msg string No Free-text message (supports templates)
title string No Optional header above Data (kv mode only)

Examples

# Plain message
- name: Note the host
  log:
    msg: "deploying on {{ hostname }} ({{ distribution }} {{ distribution_version }})"
# Structured payload — renders as a kv block under the title
- log:
    title: "Resolved config"
    data:
      port: "{{ port }}"
      mode: "{{ mode }}"

Platform Support

linux, darwin, windows, freebsd

Events Emitted

  • print.message