Skip to content

StepsTransferCommand

hellgate75 edited this page Mar 9, 2020 · 4 revisions

Go! Deploy logo

Go! Deploy

Tranfer Command Structure Section

Tranfer Command Step

Tranfer command allows to execute remote file trasfer, of a file or entire folder recursively, eventually defining the file file/folder permissions on the O/S disk position.

Here command syntax sample:

- name: My Tranfer Command of a single file, changing name
  copy:
    source: /temp/my-app-log-config.xml
    destination: ~/log/{{ item }}/config/log-config-{{ MyVarName1 }}-{{ MyVarName2 }}-{{ item }}.xml
	createIfMissing: false #useful only in presence of folders, it creates subfolders
	perm: 0660
	withVars:
	- MyVarName1
	- MyVarName2
	withList:
	- dev-01
	- dev-02
	- dev-03

Here we have a copy of a file with new name based on 2 valiables, iterated for the {{ item }} in the provided list and placed in a folder depending on the item name form the same list, all contatenated ad replaced before the command is executed. Use of iterator value is not limited in the file input or output position.

Another useful case is :

- name: My Tranfer Command of and entire folder and subfolders, changing top folder name
  copy:
    source: /temp/my-app-log-config-dir
    destination: ~/log/{{ MyVarName1 }}/config/log-config-{{ MyVarName1 }}-{{ MyVarName2 }}-dir
	createIfMissing: false #useful in presence of folders, it creates subfolders, and on goals of this sample
	perm: 0660
	withVars:
	- MyVarName1
	- MyVarName2

In this case differently creation of the folder will automatically means the copy of the entire content of the same source folder in a custom position.

No memory limit or tranfer traffic is affected by the command in a DMZ or dedicated / same network or subnet or datacenter or single zone. In any other case we kindly require to examinate traffic limitations between nodes in nearby networks.

Use cases

Use cases for this command are related to the sftp or other protocol files/folders copy from a source on the client folder to the target destination on the host operating system.

We will provide soon a switcher to chose one user or root access request to login before trasfer.

Navigate the site

Come back to the Steps Structure Section

Clone this wiki locally