#na_ontap_user delete issue

1 messages · Page 1 of 1 (latest)

vapid tendon
#

Team,

Looking for help. When I am trying to delete user with only ssh, it is also deleteting other applications like console,ontapi..etc.

How can I delete only one applications for user (ssh not otherapplications)?

  • name: Delete User netapp.ontap.na_ontap_user:
    state: absent
    name: SampleUser
    applications: ssh
    authentication_method: password
    vserver: ansibleVServer
    hostname: "{{ netapp_hostname }}" username: "{{ netapp_username }}" password: "{{ netapp_password }}"
round siren
#

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.

vapid tendon
#

@round siren Thank you. So that is the trick...got it

vapid tendon
#

@round siren please suggest

#

For snmp:

#

I am getting as "snmp as Application is not supported in REST"

#

How do I overcome using Zapi