payload: {"action":"opened","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/62910","repository_url":"https://api.github.com/repos/ansible/ansible","labels_url":"https://api.github.com/repos/ansible/ansible/issues/62910/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/62910/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/62910/events","html_url":"https://github.com/ansible/ansible/issues/62910","id":499452320,"node_id":"MDU6SXNzdWU0OTk0NTIzMjA=","number":62910,"title":"Module rabbitmq_queue not working if management has path_prefix set","user":{"login":"sbattistin","id":20923264,"node_id":"MDQ6VXNlcjIwOTIzMjY0","avatar_url":"https://avatars0.githubusercontent.com/u/20923264?v=4","gravatar_id":"","url":"https://api.github.com/users/sbattistin","html_url":"https://github.com/sbattistin","followers_url":"https://api.github.com/users/sbattistin/followers","following_url":"https://api.github.com/users/sbattistin/following{/other_user}","gists_url":"https://api.github.com/users/sbattistin/gists{/gist_id}","starred_url":"https://api.github.com/users/sbattistin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbattistin/subscriptions","organizations_url":"https://api.github.com/users/sbattistin/orgs","repos_url":"https://api.github.com/users/sbattistin/repos","events_url":"https://api.github.com/users/sbattistin/events{/privacy}","received_events_url":"https://api.github.com/users/sbattistin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2019-09-27T13:38:49Z","updated_at":"2019-09-27T13:38:49Z","closed_at":null,"author_association":"NONE","body":"##### SUMMARY\r\nWhen using the `rabbitmq_queue` module, if the management plugin (in the RabbitMQ server) is configured to use a path_prefix (https://www.rabbitmq.com/management.html#path-prefix), the module will be useless and won't allow queues' creation.\r\n\r\n##### ISSUE TYPE\r\nThis looks like a bug since is preventing the module to work correctly.\r\n\r\n##### COMPONENT NAME\r\n`rabbitmq_queue` (and others related that uses the RabbitMQ api to perform changes)\r\n\r\n##### ANSIBLE VERSION\r\n```\r\nansible 2.5.1\r\n  config file = /etc/ansible/ansible.cfg\r\n  configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']\r\n  ansible python module location = /usr/lib/python2.7/dist-packages/ansible\r\n  executable location = /usr/bin/ansible\r\n  python version = 2.7.15+ (default, Jul  9 2019, 16:51:35) [GCC 7.4.0]\r\n```\r\n\r\n##### CONFIGURATION\r\n```\r\n<empty>\r\n```\r\n\r\n##### OS / ENVIRONMENT\r\nOS: Ubuntu 18.04 LTS\r\n\r\nNote: all tests were done locally to exclude network related issues.\r\n\r\n##### STEPS TO REPRODUCE\r\nConfigure RabbitMQ management plugin to have a `path_prefix`. Edit the configuration file (`/etc/rabbitmq/rabbitmq.conf`) and make sure that there is the follwing line\r\n\r\n```\r\nmanagement.path_prefix = /prefix-you-want\r\n```\r\n\r\nRestart rabbitmq (`service rabbitmq-server restart`)\r\nTry to run the following task:\r\n```yaml\r\n- name: Creating queue \"my-queue\"\r\n  rabbitmq_queue:\r\n    name: my-queue\r\n```\r\n\r\n##### EXPECTED RESULTS\r\nI'm expecting a new queue to be created and the task to be successful.\r\n\r\n##### ACTUAL RESULTS\r\nIt will fail with the following message:\r\n```\r\nTASK [common : Creating exchange \"dead-letter-global-exchange\"] ****************\r\nfatal: [localhost]: FAILED! => {\"changed\": false, \"details\": \"{\\\"error\\\":\\\"Object Not Found\\\",\\\"reason\\\":\\\"Not Found\\\"}\", \"msg\": \"Error creating exchange\", \"status\": 404}\r\n```\r\n"}}
other: {"actor":{"display_login":"sbattistin"}}