scone/docs/recipes/declare.md

1.7 KiB

Declare

Sometimes we need to tell Scone that a resource already exists on the sous, and that scone doesn't need it to be provided by the menu.

The solution to this is to have no-operation recipes that provide these resources.

Recipe Needs Provides
declare-os-user os-user
declare-dir directory
declare-file file

declare-os-user

Preconditions: the OS user must already exist on the sous.

Provides: os-user(?) where ? is the argument name.

Argument Accepted Values Default Description
name any username string required Username of the OS (e.g. Linux) user that already exists.

Example

[[declare-os-user]]
name = root

declare-dir

Preconditions: the specified directory must already exist on the sous.

Provides: directory(?) where ? is the argument path.

Argument Accepted Values Default Description
path any path string required Path of the directory that already exists.

Example

[[declare-dir]]
path = /etc/systemd/system

declare-file

Preconditions: the specified file must already exist on the sous.

Provides: file(?) where ? is the argument path.

Argument Accepted Values Default Description
path any path string required Path of the file that already exists.

Example

[[declare-file]]
path = /etc/passwd