directory
!directory
Category: files
Manage a directory on the target — create, remove, or adjust attributes. Fails if the path is an existing regular file.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
path | path | yes | Absolute path of the directory to manage. |
remove | bool | no | Remove the directory if it exists. |
recurse | bool | no | Apply attribute changes recursively into the directory contents. |
attributes | map | no | File attributes: owner, group, mode. |
Examples
- !directory
path: /srv/app/data
recurse: true
attributes:
owner: app
mode: '0o755'