jacklotusho / jacklotusho.zosag / 1.0.0 / module / zos_copy Copies files to remote locations on z/OS hosts | "added in version" 0.0.1 of jacklotusho.zosag" Authors: Luke Zhao stableinterface | supported by core This plugin has a corresponding action plugin.jacklotusho.zosag.zos_copy (1.0.0) — module
Install with ansible-galaxy collection install jacklotusho.zosag:==1.0.0
collections: - name: jacklotusho.zosag version: 1.0.0
The C(zos_copy) module copies a file on the local box to remote z/OS locations.
- name: Copy a single file to a PS zos_copy: src: /src/myfiles/test.ps dest: zoscopy.ps
- name: Copy a single file to a PDS member zos_copy: src: /src/myfiles/test.pds dest: zoscopy.pds
- name: Copy a single file to a VSAM(KSDS) zos_copy: src: /src/myfiles/test.pds dest: zoscopy.vsam
- name: Copy a single file to a USS file zos_copy: src: /src/myfiles/test.uss dest: /u/userid isUSS: True
- name: Copy folder contents recursively win_copy: src: files/temp_files/ dest: C:\Temp
src: description: - Local path to a file to copy to the remote server; can be absolute or relative. - If path is a directory, it is copied (including the source folder name) recursively to C(dest). - If path is a directory and ends with "/", only the inside contents of that directory are copied to the destination. Otherwise, if it does not end with "/", the directory itself with all contents is copied. - If path is a file and dest ends with "\", the file is copied to the folder with the same filename. - Required unless using C(content). - if path is a directory, all the files in it should to be copy to a PDS(E). type: str dest: description: - Remote absolute path or data set where the file should be copied to. - "Destination can be a USS location separated with \u2018/\u2019 or MVS location\ \ separated with \u2018.\u2019." - If C(src) is a directory, this must be a directory too. - If C(dest) is a nonexistent path, it will be created. - If C(src) and C(dest) are files and if the parent directory of C(dest) doesn't exist, then the task will fail. - If C(dest) is a PDS, PDS(E) or VSAM, the copy will only work into already allocated resource. required: true type: str force: default: true description: - If set to C(yes), the file will only be transferred if the content is different than destination. - If set to C(no), the file will only be transferred if the destination does not exist. - If set to C(no), no checksuming of the content is performed which can help improve performance on larger files. type: bool isUSS: default: false description: - Specify the C(dest) is a USS file or MVS Data Set. - Default is False, MVS Data Set. type: bool backup: default: false description: - Determine whether a backup should be created. - When set to C(yes), create a backup file including the timestamp information so you can get the original file back if you somehow clobbered it incorrectly. - No backup is taken when C(remote_src=False) and multiple files are being copied. type: bool isVSAM: default: false description: - Specify the C(dest) is a VSAM or not. - Default is False, Non-VSAM data set. type: bool volume: description: - Name of the volume in case isCatalog is False. type: str content: description: - When used instead of C(src), sets the contents of a file directly to the specified value. - This is for simple values, for anything complex or with formatting please switch to the M(template) module. type: str decrypt: default: true description: - This option controls the autodecryption of source files using vault. type: bool encoding: default: EBCDIC description: - Indicate the encoding of the existing resource on the system. Setting this to ASCII module will not convert the encoding before transfer. Whereas setting to default value of EBCDIC module will convert the content in temp file on z/OS to ASCII before transfer. - Only valid if isbinary is set to False. - Default is EBCDIC.(ASCII/EBCDIC) type: str isBinary: default: false description: - Specify the format of the file(s) from C(src) is binary or not. type: bool isCatalog: default: true description: - If the C(dest) is a Data Set, check if it's cataloged or not. type: bool remote_src: default: false description: - Not support now. - If C(no), it will search for src at originating/master machine. - If C(yes), it will go to the remote/target machine for the src. type: bool local_follow: default: true description: - If dest is a USS position. - This flag indicates that filesystem links in the source tree, if they exist, should be followed. type: bool useQualifier: default: true description: - Add user qualifier to datasets, default is True. type: bool
backup_file: description: Name of the backup file that was created. returned: if backup=yes sample: 11540.20150212-220915.bak type: str checksum: description: SHA1 checksum of the file after running copy. returned: success, src is a file sample: 6e642bb8dd5c2e027bf21dd923337cbb4214f827 type: str dest: description: Destination file/path or MVS data set name. returned: changed sample: IBMUSER.TEST.PS type: str size: description: Size of the target, after execution. returned: changed, src is a file sample: 1220 type: int(BYTES) src: description: Source file used for the copy on the target machine. returned: changed sample: /home/httpd/.ansible/tmp/ansible-tmp-1423796390.97-147729857856000/source type: str