Have the data_set_name sub-option in the dd_data_set module sub-option be optional. If left blank, the code should call mvstmp to generate a temporary data set name and pass that into current code logic.
Scenario: User wants to leverage dd_data_set with a temporary data set.
As-is:
User must generate a value to pass to data_set_name.
- name: Create a temporary dataset name.
ansible.builtin.command: "mvstmp {{ ansible_user | upper }}"
register: tmp_dest_ds
- name: Set fact `default_dataset_name`.
set_fact:
default_dataset_name: "{{ tmp_dest_ds.stdout }}"
- name: mvs raw - uptime - output into data set.
zos_mvs_raw:
program_name: bpxbatch
parm: "SH uptime"
dds:
- dd_data_set:
dd_name: stdout
data_set_name: "{{ default_dataset_name }}"
type: seq
disposition: new
disposition_normal: delete
To-be:
data_set_name option is not required, and if left blank, the module logic calls mvstmp and generates a temporary data set name for the user.
- name: mvs raw - uptime - output into data set.
zos_mvs_raw:
program_name: bpxbatch
parm: "SH uptime"
dds:
- dd_data_set:
dd_name: stdout
type: seq
disposition: new
disposition_normal: delete
The idea for this enhancement came out of the ansible-z-collections-guild channel -
CSLEJ8VGV/p1715619684032219?thread_ts=1715596457.843399&cid=CSLEJ8VGV
Is there an existing issue for this?
Enhancement or feature description
Have the
data_set_name
sub-option in thedd_data_set
module sub-option be optional. If left blank, the code should callmvstmp
to generate a temporary data set name and pass that into current code logic.Scenario: User wants to leverage
dd_data_set
with a temporary data set.As-is:
User must generate a value to pass to
data_set_name
.To-be:
data_set_name
option is not required, and if left blank, the module logic callsmvstmp
and generates a temporary data set name for the user.The idea for this enhancement came out of the ansible-z-collections-guild channel -
CSLEJ8VGV/p1715619684032219?thread_ts=1715596457.843399&cid=CSLEJ8VGV
Ansible module
zos_mvs_raw