ansible-for-i icon indicating copy to clipboard operation
ansible-for-i copied to clipboard

Set system values for QPWDMINLEN and QPWDRQDDGT

Open quikjean opened this issue 3 years ago • 1 comments

Hi This might not be a real issue I am new to Ansible on IBM i. I am trying to set up some system values through Ansible. I made it work okay with some but I get the following error with doing it with QPWDMINLEN and QPWDRQDDGT (I have QPWDLVL set to 2 - and it works with CHGSYSVAL in my shell script)

My code :

  • name: Setup system values ibm.power_ibmi.ibmi_sysval: sysvalue: - {'name':'QMAXSGNACN', 'expect':'1'} - {'name':'QMAXSIGN', 'expect':'*NOMAX'} - {'name':'QPWDMAXLEN', 'expect':'128'} - {'name':'QTIMZON', 'expect':'QN0500EST3'}

  • name: test ibm.power_ibmi.ibmi_sysval: sysvalue: - {'name':'QPWDMINLEN', 'expect': 15} - {'name':'QPWDRQDDGT', 'expect':"1"}

And the failure output of the second task : fatal: [d1237-pvm2.d1237.cecc.ihost.com]: FAILED! => changed=false

Thanks for your help on that fail_list:

  • check: equal compliant: false expect: 13 msg: Compliant check failed name: QPWDMINLEN rc: -2 type: 10i0 value: '6'
  • check: equal compliant: false expect: '1' msg: Compliant check failed name: QPWDRQDDGT rc: -2 type: 4A value: '0' message: '' msg: non-zero return code when get system value:-2 rc: -2 stderr: non-zero return code when get system value:-2 stderr_lines: sysval: []

It might be me with the type of data to pass in... but not sure.

quikjean avatar May 27 '21 17:05 quikjean

and just a FYI, I tried setting the values with single quotes/double quotes/no quote and that's why it differs a bit from the 1st task where I use only single quotes.

quikjean avatar May 27 '21 17:05 quikjean