# Openstack module: Unable to create a router from specific users

**URL:** <https://forum.ansible.com/t/openstack-module-unable-to-create-a-router-from-specific-users/23983>\
**Category:** Ansible Project\
**Created:** [March 15, 2017, 6:40pm UTC](https://forum.ansible.com/t/openstack-module-unable-to-create-a-router-from-specific-users/23983 "2017-03-15T18:40:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Robson\_Ramos\_Barreto](https://avatars.discourse-cdn.com/v4/letter/r/b77776/32.png) [@Robson\_Ramos\_Barreto](https://forum.ansible.com/u/Robson_Ramos_Barreto)\
**Post date:** [March 15, 2017, 6:40pm UTC](https://forum.ansible.com/t/openstack-module-unable-to-create-a-router-from-specific-users/23983/1 "2017-03-15T18:40:23Z")

</div>

Hi,

I’m trying create a router from specfic user using auth instead of cloud option and I’m getting the following message error:

`  
TASK [os\_router : create a virtual router]

---

<div class="post-metadata">

**Author:** ![Robson\_Ramos\_Barreto](https://avatars.discourse-cdn.com/v4/letter/r/b77776/32.png) [@Robson\_Ramos\_Barreto](https://forum.ansible.com/u/Robson_Ramos_Barreto)\
**Post date:** [March 16, 2017, 7:18pm UTC](https://forum.ansible.com/t/openstack-module-unable-to-create-a-router-from-specific-users/23983/2 "2017-03-16T19:18:21Z")

</div>

Hi

I did something like below and it worked as I wanted:

`

- name: check if router exists  
shell: neutron --os-username=“{{ os\_user }}” --os-password=“{{ os\_user\_password }}” --os-tenant-name=“{{ os\_project }}” --os-auth-url=“{{ os\_auth\_url }}” router-list | awk ‘/{{ os\_router\_name }}/’ | wc -l  
register: router

- name: create a router if it does not exist  
when: router.stdout == “0”  
shell: |  
neutron --os-username=“{{ os\_user }}” --os-password=“{{ os\_user\_password }}” --os-tenant-name=“{{ os\_project }}” --os-auth-url=“{{ os\_auth\_url }}” router-create “{{ os\_router\_name }}”  
neutron --os-username=“{{ os\_user }}” --os-password=“{{ os\_user\_password }}” --os-tenant-name=“{{ os\_project }}” --os-auth-url=“{{ os\_auth\_url }}” router-interface-add “{{ os\_router\_name }}” “{{ os\_subnet\_name }}”  
neutron --os-username=“{{ os\_user }}” --os-password=“{{ os\_user\_password }}” --os-tenant-name=“{{ os\_project }}” --os-auth-url=“{{ os\_auth\_url }}” router-gateway-set “{{ os\_router\_name }}” “{{ os\_network\_public }}”  
exit 0

`

Instead, I want to use the standard os\_router module to do just like the roles posted before

I do not know if I’m doing something wrong or if there is a bug on the os\_router module

Thank you
