jacklotusho / jacklotusho.zosag / 1.0.0 / module / zos_dataset Create and set attributes for data sets | "added in version" 2.9 of jacklotusho.zosag" Authors: @blakeinate preview | supported by communityjacklotusho.zosag.zos_dataset (1.0.0) — module
Install with ansible-galaxy collection install jacklotusho.zosag:==1.0.0
collections: - name: jacklotusho.zosag version: 1.0.0
Create, delete and set attributes of datasets.
When forcing dataset replacement, contents will not be preserved.
- name: Create a sequential dataset if it does not exist zos_dataset: name: user.private.test type: seq state: present
- name: Create a PDS dataset if it does not exist zos_dataset: name: user.phys.seqt type: pds size: 5M format: fb record_length: 25
- name: Attempt to replace a dataset if it exists zos_dataset: name: user.phys.seqt type: pds size: 5M format: fb record_length: 25 replace: yes
- name: Attempt to replace a dataset if it exists, allow unsafe_writes zos_dataset: name: user.phys.seqt type: pds size: 5M format: fb record_length: 25 replace: yes unsafe_writes: yes
- name: Delete a dataset if it exists zos_dataset: name: user.dsto.del state: absent
name: aliases: - dataset - ds - dsname description: - "The name of the dataset being managed. (e.g \u201CUSER.TEST\u201D)" required: true type: str version_added: '2.9' version_added_collection: jacklotusho.zosag size: description: - "The size of the dataset. (e.g \u201C5M\u201D)" required: false type: str version_added: '2.9' version_added_collection: jacklotusho.zosag type: aliases: - dstype choices: - ksds - esds - rrds - lds - seq - pds - pdse description: - "The dataset type to be used when creating a dataset. (e.g \u201Cpdse\u201D)" required: false version_added: '2.9' version_added_collection: jacklotusho.zosag state: choices: - present - absent default: present description: - The final state desired for specified dataset. - "If `absent`, will ensure the dataset is not present on the system. Note that `absent`\ \ will not cause `zos_dataset` to fail if dataset does not exist as the state did\ \ not change. \n" - 'If `present`, will ensure the dataset is present on the system. Note that `present` will not replace an existing dataset by default, even when the attributes do not match our desired dataset. If replacement behavior is desired, see the options `replace` and `unsafe_writes`. ' required: false version_added: '2.9' version_added_collection: jacklotusho.zosag format: aliases: - record_format - recfm choices: - fb - vb - fba - vba - u description: - "The format of the dataset. (e.g \u201CFB\u201D)" required: false version_added: '2.9' version_added_collection: jacklotusho.zosag replace: default: false description: - When `replace` is `true`, and `state` is `present`, existing dataset matching name will be replaced. - 'Replacement is performed by allocating a new dataset with our desired attibutes to ensure space is available, then the original dataset is removed and our new dataset is moved to the original dataset name. ' - 'In cases where the above method of replacement may fail due to lack of space or other issues, `unsafe_writes` can be specified to force delete and create without the intermediate dataset creation. Please note this is more unlikely to leave datasets in an inconsistent state. Use `unsafe_writes` with caution. ' required: false type: bool version_added: '2.9' version_added_collection: jacklotusho.zosag data_class: aliases: - dataclas description: - The data class name (required for SMS-managed datasets) required: false type: str version_added: '2.9' version_added_collection: jacklotusho.zosag key_offset: aliases: - offset description: - The key offset (required for KSDS datasets) required: false type: int version_added: '2.9' version_added_collection: jacklotusho.zosag record_length: aliases: - lrecl description: - The logical record length. (e.g 80) required: false type: int version_added: '2.9' version_added_collection: jacklotusho.zosag unsafe_writes: default: false description: - 'In cases where `replace` is `true` and "safe write" (create temporary dataset with desired attributes and replace) fails, `unsafe_writes` will delete the existing dataset and try to create our new dataset without intermediate dataset creation. ' - "`unsafe_writes` is meant to be used in cases where available space is smaller than\ \ what is necessary to create our intermediate dataset. Deletion of the existing\ \ dataset in this case can free up required space for new dataset creation. \n" - 'Use of this option is not recommended in most cases. For instance, if an invalid set of parameters are provided for dataset creation, `unsafe_writes` would cause deletion of the existing dataset without any replacement. ' required: false type: bool version_added: '2.9' version_added_collection: jacklotusho.zosag
changed: description: Indicates if any changes were made during module operation. type: bool message: description: The output message that the sample module generates stderr: description: Any error text from the module type: str stdout: description: The output from the module type: str type: dict original_message: description: The original list of parameters and arguments, plus any defaults used. type: dict