copy
!copy
Category: files
Copy a file (or recursively a directory tree) from the control machine to the target. Idempotent via SHA-512 content comparison.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
src | string | yes | Local source path (a directory when recursive: true; otherwise resolved through files/ lookup). |
dest | path | yes | Remote destination path. |
recursive | bool | no | Recursively copy an entire local directory tree to dest. |
attributes | map | no | File attributes applied to copied files: owner, group, mode. |
Examples
- !copy
src: app.conf
dest: /etc/app/app.conf
attributes:
mode: '0o600'