# os\_router module doubt

**URL:** <https://forum.ansible.com/t/os-router-module-doubt/26289>\
**Category:** Ansible Project\
**Created:** [December 14, 2017, 9:32am UTC](https://forum.ansible.com/t/os-router-module-doubt/26289 "2017-12-14T09:32:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Carlos\_Tolon](https://avatars.discourse-cdn.com/v4/letter/c/59ef9b/32.png) [@Carlos\_Tolon](https://forum.ansible.com/u/Carlos_Tolon)\
**Post date:** [December 14, 2017, 9:32am UTC](https://forum.ansible.com/t/os-router-module-doubt/26289/1 "2017-12-14T09:32:23Z")

</div>

Hi there,

I am working with openstack modules (os\_network, os\_router, os\_subnet, …)

The point is that I am trying to remove a router, a subnet and a network with this modules but I am getting an error when trying to do it, specifically “subnet still has ports”.

From Openstack CLI, steps to to this is: detach subnet from the router, remove subnet, remove network and, finally, remove router.

My question is: how can I detach the subnet from the router in order to be able to remove? Thank you
