This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Delete Node from Ansible

Hi

I am trying to delete node from Ansible play book, but getting error message "Verb Orion.Nodes.Delete: Not found"

What is API to delete node?

- name: Delete SolarWinds monitoring agent
uri:
url: "">10.10.10.10:17778/.../Delete"
method: POST
user: "{{ solarwinds_user }}"
password: "{{ solarwinds_password }}"
body: '{"NetObjectId": {{ agent_id }}}'
body_format: json
return_content: yes
validate_certs: no
headers:
Accept: "application/json"

Thanks

  • In PowerShell, you can use "Remove-SwisObject" to delete a node. It requires Node URI as the parameter. 

    For your REST example, I don't have a sample request to share but I think your method should be set to "DELETE" instead of "POST" and the URI should be set to the Node URI that you would like to delete.