Skip to content

Command

The builtin.command resource allows you to run shell commands using Peekl.

Resource parameters

NameDescriptionRequiredDefault
commandCommand to run.true
argsList of arguments to use in the command.false[]
createsPath to a file that the command create to make it idempotent.false
register_outputVariables to which to register the output (stdout) of the command.false
shellThe shell to use to run the command. Only support bash for nowfalsebash

Examples

Run command that output 'hello' to file, and creates the file so that it doesn't run again.

yaml
- title: "Output 'hello' to file"
  type: "builtin.command"
  data:
    command: "echo hello > /tmp/hello_file"
    creates: "/tmp/hello_file"