Hi PhoneBoy,
Yes that is correct, the error message is only presented when you try to change the user "admin" se below result using this playbook: https://github.com/checkpointsw-devsec/chkp-api-examples/blob/master/Ansible/Gaia/cp_gaia_user.yml
TASK [Set password for the test user] ***************************************************************************************************************************************************************************************************************************************
changed: [192.168.233.51] => {
"changed": true,
"invocation": {
"module_args": {
"allow_access_using": [
"CLI",
"Web-UI"
],
"homedir": null,
"must_change_password": null,
"name": "test",
"password": null,
"password_hash": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"primary_system_group_id": 100,
"real_name": "test user",
"roles": null,
"secondary_system_groups": null,
"shell": "cli",
"state": "present",
"uid": null,
"unlock": null
}
},
"user": {
"allow_access_using": [],
"homedir": "/home/test",
"locked": "",
"must_change_password": "",
"name": "test",
"primary_system_group_id": 100,
"real_name": "test user",
"requires_two_factor_authentication": false,
"roles": [],
"secondary_system_groups": [],
"shell": "cli",
"uid": 0
}
}
TASK [print test user settings] *********************************************************************************************************************************************************************************************************************************************
ok: [192.168.233.51] => {
"msg": {
"changed": true,
"failed": false,
"user": {
"allow_access_using": [],
"homedir": "/home/test",
"locked": "",
"must_change_password": "",
"name": "test",
"primary_system_group_id": 100,
"real_name": "test user",
"requires_two_factor_authentication": false,
"roles": [],
"secondary_system_groups": [],
"shell": "cli",
"uid": 0
},
"warnings": [
"Module did not set no_log for must_change_password"
]
}
}
TASK [Set password for the admin user] **************************************************************************************************************************************************************************************************************************************
fatal: [192.168.233.51]: FAILED! => {
"changed": false,
"invocation": {
"module_args": {
"allow_access_using": [
"CLI",
"Web-UI"
],
"homedir": null,
"must_change_password": null,
"name": "admin",
"password": null,
"password_hash": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"primary_system_group_id": 100,
"real_name": null,
"roles": null,
"secondary_system_groups": null,
"shell": "cli",
"state": "present",
"uid": null,
"unlock": null
}
},
"msg": "Checkpoint device returned error 400 with message {'code': 'err_validation_failed', 'errors': 'Cannot change this attribute of user admin', 'msg': 'Validation Error'}"
}
PLAY RECAP ******************************************************************************************************************************************************************************************************************************************************************
192.168.233.51 : ok=5 changed=1 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0