ncstate / ncstate.network / 1.1.3 / module / sftp_send Send data directly to SFTP server from where ansible runs. Authors: Matt Haught (@haught)ncstate.network.sftp_send (1.1.3) — module
Install with ansible-galaxy collection install ncstate.network:==1.1.3
collections: - name: ncstate.network version: 1.1.3
This module allows sending files and text using SFTP.
The module sends from wherever the playbook is run.
- name: Send sftp file ncstate.network.sftp_send: host: 1.2.3.4 username: foo password: bar src: "{{ string }}" dest_filename: '/dest/file.txt'
src: description: - The text of the source file. required: true type: str host: description: - The IP address or hostname of destination SFTP server. required: true type: str port: default: 22 description: - The port of destination SFTP server. required: false type: int password: description: - The password for the connection. required: true type: str username: description: - The username for the connection. required: true type: str dest_filename: description: - The destination filename. required: true type: str
stdout: description: The set of responses from the commands returned: always apart from low level errors (such as action plugin) sample: - '...' - '...' type: list stdout_lines: description: The value of stdout split into a list returned: always sample: - - '...' - '...' - - '...' - - '...' type: list