This is the documentation for the Built-in Functino copy.
| Parameter | Required | Description |
|---|---|---|
src |
✅ | The source file or folder. |
dest |
✅ | The destination file or folder. |
recursive |
❌ | If true, the source folder will be copied recursively. Default is false. |
actions:
- name: Copy ssh files to ~/.ssh
operandum.builtin.copy:
# For the line below, assume there is a folder named `ssh`
# in the same directory as the Task file.
src: "./ssh/*"
dest: "~/.ssh"
recursive: true- The command functions as a
cpcommand. - The recursive option is equivalent to the
-rflag in thecpcommand. - The
srcanddestpaths can be relative or absolute. - The
srcpath can contain the wildcard*only for children of a folder.- For example,
./ssh/*will copy all files and folders inside thesshfolder.
- For example,
- The
destpath can be a folder or a file.