theko2fi.multipass.multipass_vm_transfer_into module – Copy a file into a Multipass virtual machine
Note
This module is part of the theko2fi.multipass collection (version 0.3.0).
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install theko2fi.multipass
.
To use it in a playbook, specify: theko2fi.multipass.multipass_vm_transfer_into
.
New in theko2fi.multipass 0.2.0
Synopsis
Copy a file into a Multipass virtual machine.
Similar to
multipass transfer
.
Parameters
Parameter |
Comments |
---|---|
The file’s content. If you plan to provide binary data, provide it pre-encoded to base64, and set Mutually exclusive with |
|
If set to To use binary Choices:
|
|
Path to a file inside the Multipass virtual machine. Must be an absolute path. |
|
The name of the virtual machine to copy files to. |
|
Examples
- name: Copy a file into the VM
theko2fi.multipass.multipass_vm_transfer_into:
name: foo
src: /home/user/data.txt
dest: /home/ubuntu/input.txt
- name: Copy a content into the VM
theko2fi.multipass.multipass_vm_transfer_into:
name: foo
content: "Hello World!"
dest: /home/ubuntu/input.txt
- name: Copy a file into the VM (ignore errors)
theko2fi.multipass.multipass_vm_transfer_into:
name: foo
src: /home/user/data.txt
dest: /input.txt
ignore_errors: true