@jovial fjord
I've just done some more testing and found a crazy error that I can't explain at the moment.
Normally I create a random password as follows:
vars:
- var_role_backupUserPassword: "{{ lookup('password', '/dev/null chars=ascii_letters,digits length=32') }}"
which then leads to the following result:
TASK [create User] *****************************************************************************************************
changed: [localhost]
TASK [debug] ***********************************************************************************************************
ok: [localhost] => {
"var_role_backupUserPassword": "ILXFjg02JgVjj57HDQ1JFW3IZZG9ctIV"
}
If I now set this password again via CLI, it works, which means that it was not set before, otherwise you would get an error (see next test):
cluster01::> security login password -vserver abc_svm01 -username ansible-test
Enter a new password:
Enter it again:
cluster01::>
If I now execute the same playbook, but instead of generating a password I store a fixed password in the same variable, this is set cleanly:
vars:
- var_role_backupUserPassword: "NetApp1234567"
This run then looks as follows:
TASK [create User] *****************************************************************************************************
changed: [localhost]
TASK [debug] ***********************************************************************************************************
ok: [localhost] => {
"var_role_backupUserPassword": "NetApp1234567"
}
And now when I try to set the same password again via CLI, I get the following error, which means that the password is already set:
cluster01::> security login password -vserver abc_svm01 -username ansible-test
Enter a new password:
Enter it again:
Error: command failed: New password must be different from the old password.
cluster::>
Do you have any ideas?