Skip to content

Conditionals

William Young edited this page May 11, 2018 · 1 revision

Conditionals

Conditionals allow you to disable and enable lines of your config with if like conditional statements.

Currently there is no 'else' style operation.

Special Matchers

Hostname

#?hostname=my-hostname
## Do stuff
#??
#?hostname~my-regex-hostname
## Do stuff
#??

System

#?system=Linux
## Do something on linux
#??
#?system~^.*n[iu]x$
## Do something on linux, or unix. or any other *nix system
#??

Arch

#?arch=x86_64
## Do something on 64 bit intel systems
#??
#?arch~64
## Do something on any 64 bit system
#??