File Transfer File Transfer: File Transfer - SMB Shares

Summary

This module contains actions for uploading & downloading files to/from an SMB/CIFS file server. It facilitates file sharing on windows machines using the SMB1 and SMB2 protocols and with linux machines using the Samba server application.

Actions

file_transfer.smb_share.

download

Download a shared file from an SMB/CIFS file share to the task workspace.

Minimum Plugin Version: 1.0.0

Input
  • server: a Server dictionary

  • share_name: the name of the shared folder

  • source: the path to download the source file from on the file share

  • destination: the name of the file to be saved in the task workspace

Output

Nothing is outputted by this action.

Example
1
2
3
4
5
6
7
8
9
- file_transfer.smb_share.download:
    destination: a_file.txt
    server:
      address: 233.252.0.25
      username: username@example.domain
      password: Password
      name: mem-1
    share_name: smb_share
    source: sub_folder/share_file.txt

file_transfer.smb_share.

upload

Upload a file from the task workspace to a folder on an SMB/CIFS file share.

Minimum Plugin Version: 1.0.0

Input
  • server: a Server dictionary

  • share_name: the name of the shared folder

  • source: the name of the file to be uploaded from the task workspace

  • destination: the path to upload the source file to on the file share

Output

Nothing is outputted by this action.

Example
1
2
3
4
5
6
7
8
9
  - file_transfer.smb_share.upload:
      destination: sub_folder/uploaded_file.txt
      server:
        address: 233.252.0.25
        username: username@example.domain
        password: Password
        name: mem-1
      share_name: smb_share
      source: a_file.txt