Skip to content

Command

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

Parameters

NameDescriptionRequiredDefault
commandCommand to runtrue
argsList of arguments to use with the commandfalse[]
createsPath to a file that the command creates to make it idempotentfalse
register_outputVariable to which the command output (stdout) should be registered tofalse
shellThe shell to use to run the commandfalsebash

Examples

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

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