ansible-for-i
ansible-for-i copied to clipboard
ibmi_sysval should be able to change sysval values
Referring to: https://github.com/IBM/ansible-for-i/blob/devel/plugins/modules/ibmi_sysval.py
ibmi_sysval
module should be able to change sysval values using the CHGSYSVAL
command and not just perform checking. It should also follow the immutable concept where if the sysval already in the expected values, it would not be changed. Example yaml would be as follows:
- ibm.power_ibmi.ibmi_sysval:
sysvalue:
- name: QALWOBJRST
expect: "*ALL *ALWPTF"
check: "equal_as_list"
value: "*ALL"
The above will check if QALWOBJRST
is within the expected values and if not, will change the value as set in value if exists using the following command:
CHGSYSVAL SYSVAL({{ item.name }}) VALUE('{{ item.value }}')