Absent will always delete the user. What you want to do is just remove the application from the list
For example let say we created a user like this
- name: Create cluster scoped user in REST. netapp.ontap.na_ontap_user: state: present name: SampleUser applications: ssh,console authentication_method: password set_password: apn1242183u1298u41 lock_user: True role_name: admin hostname: "{{ netapp_hostname }}" username: "{{ netapp_username }}" password: "{{ netapp_password }}"
And now we want to remove SSH we would do the following
- name: Modify cluster scoped user in REST. netapp.ontap.na_ontap_user: state: present name: SampleUser applications: console authentication_method: password set_password: apn1242183u1298u41 lock_user: True role_name: admin hostname: "{{ netapp_hostname }}" username: "{{ netapp_username }}" password: "{{ netapp_password }}"
ansible will update the user SampleUser to have just console application access.