Openstack module: Unable to create a router from specific users

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]

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