echo¶
Operation to echo a message to the console.
Example¶
The following example uses the echo
operation to display a hello-world greeting to the
terminal:
steps:
"Define name to greet":
name: define_context
context_defs:
template_variables:
name: "World"
"Display greeting":
name: echo
message: |
Hello, {{ qwikstart.name }}!
In order to demonstrate how data is rendered by the echo
operation, the example uses
the define_context operation to add a name
variable to the
template_variables
dictionary in the context. When rendering, the echo
operation
reads from the template_variables
dictionary but uses a separate prefix, or namespace,
defined by template_variable_prefix
, which defaults to qwikstart
.
Required context¶
message
Message displayed to user.
Optional context¶
template_variables
Dictionary of variables available when rendering the file template.
template_variable_prefix
default:
'qwikstart'
Template variables will be nested in this namespace when rendering; e.g:
{{<template_variable_prefix>.your_template_variable}}
highlight
default:
''
Name of language used for syntax highlighting using
pygments
library. See https://pygments.org/docs/lexers/
Additional notes¶
Overrides default opconfig with:
display_description
:False