<h5 dir="auto">ISSUE TYPE</h5>

<ul dir="auto">
<li>Bug Report</li>
</ul>
<h5 dir="auto">ANSIBLE VERSION</h5>

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible-playbook 2.2.0 (devel 329c62e914) last updated 2016/05/26 15:44:10 (GMT +200)
  lib/ansible/modules/core: (detached HEAD fb77ab49ab) last updated 2016/05/26 15:44:35 (GMT +200)
  lib/ansible/modules/extras: (detached HEAD 0e4a023a7e) last updated 2016/05/26 15:45:04 (GMT +200)
  config file = /home/daniel/Documents/openstack/ansible.cfg
  configured module search path = Default w/o overrides"><pre class="notranslate"><code class="notranslate">ansible-playbook 2.2.0 (devel 329c62e914) last updated 2016/05/26 15:44:10 (GMT +200)
  lib/ansible/modules/core: (detached HEAD fb77ab49ab) last updated 2016/05/26 15:44:35 (GMT +200)
  lib/ansible/modules/extras: (detached HEAD 0e4a023a7e) last updated 2016/05/26 15:45:04 (GMT +200)
  config file = /home/daniel/Documents/openstack/ansible.cfg
  configured module search path = Default w/o overrides
</code></pre></div>
<h5 dir="auto">CONFIGURATION</h5>
<div class="highlight highlight-source-ini notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="[defaults]
inventory = testing
action_plugins = plugins/actions"><pre class="notranslate"><span class="pl-en">[defaults]</span>
<span class="pl-k">inventory</span> = testing
<span class="pl-k">action_plugins</span> = plugins/actions</pre></div>
<h5 dir="auto">OS / ENVIRONMENT</h5>
<p dir="auto">Source:</p>
<ul dir="auto">
<li>Arch Linux with virtualenv for python2</li>
<li>Linux Mint 17.3</li>
</ul>
<p dir="auto">Destination:</p>
<ul dir="auto">
<li>Ubuntu Xenial</li>
</ul>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">Configuring Rabbitmq users was working with Ansible version 2.0.2.0 but not with 2.1.0.0 or later.<br>
I am reporting this issue in this repository since my investigation and the error message should be linked with the module_utils library rather then the extra module rabbitmq_user itself.</p>
<h5 dir="auto">STEPS TO REPRODUCE</h5>


<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="
---
- hosts: controller
  tasks:
  - name: add rabbitmq user and set privileges
    rabbitmq_user:
      user={{ item.user }}
      password={{ item.password }}
      vhost={{ item.vhost | default('/', false) }}
      node={{ item.node | default('rabbit') }}
      tags={{ (item.tags | default('')) | join(',') }}
      configure_priv={{ item.configure_priv | default('.*') }}
      read_priv={{ item.read_priv | default('.*') }}
      write_priv={{ item.write_priv | default('.*') }}
      state=present
      force={{ item.force|default('yes') }}
    with_items:
      - vhost   : /
        user    : openstack-glance
        password: password
      - vhost   : /
        user    : openstack-nova
        password: password"><pre class="notranslate">---
- <span class="pl-ent">hosts</span>: <span class="pl-s">controller</span>
  <span class="pl-ent">tasks</span>:
  - <span class="pl-ent">name</span>: <span class="pl-s">add rabbitmq user and set privileges</span>
    <span class="pl-ent">rabbitmq_user</span>:
      <span class="pl-s">user={{ item.user }}</span>
      <span class="pl-s">password={{ item.password }}</span>
      <span class="pl-s">vhost={{ item.vhost | default('/', false) }}</span>
      <span class="pl-s">node={{ item.node | default('rabbit') }}</span>
      <span class="pl-s">tags={{ (item.tags | default('')) | join(',') }}</span>
      <span class="pl-s">configure_priv={{ item.configure_priv | default('.*') }}</span>
      <span class="pl-s">read_priv={{ item.read_priv | default('.*') }}</span>
      <span class="pl-s">write_priv={{ item.write_priv | default('.*') }}</span>
      <span class="pl-s">state=present</span>
      <span class="pl-s">force={{ item.force|default('yes') }}</span>
    <span class="pl-ent">with_items</span>:
      - <span class="pl-ent">vhost   </span>: <span class="pl-s">/</span>
        <span class="pl-ent">user    </span>: <span class="pl-s">openstack-glance</span>
        <span class="pl-ent">password</span>: <span class="pl-s">password</span>
      - <span class="pl-ent">vhost   </span>: <span class="pl-s">/</span>
        <span class="pl-ent">user    </span>: <span class="pl-s">openstack-nova</span>
        <span class="pl-ent">password</span>: <span class="pl-s">password</span></pre></div>

<h5 dir="auto">EXPECTED RESULTS</h5>

<p dir="auto">The configuration should be carried out without errors.</p>
<h5 dir="auto">ACTUAL RESULTS</h5>


<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TASK [add rabbitmq user and set privileges] ************************************
task path: /home/daniel/Documents/openstack/playbook.yml:4
Using module file /home/daniel/Downloads/ansible/lib/ansible/modules/extras/messaging/rabbitmq_user.py
&lt;192.168.33.11&gt; ESTABLISH SSH CONNECTION FOR USER: openstackadmin
&lt;192.168.33.11&gt; SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=openstackadmin -o ConnectTimeout=10 -o ControlPath=/home/daniel/.ansible/cp/ansible-ssh-%h-%p-%r 192.168.33.11 '/bin/sh -c '&quot;'&quot;'( umask 77 &amp;&amp; mkdir -p &quot;` echo $HOME/.ansible/tmp/ansible-tmp-1464271664.69-10598674319575 `&quot; &amp;&amp; echo ansible-tmp-1464271664.69-10598674319575=&quot;` echo $HOME/.ansible/tmp/ansible-tmp-1464271664.69-10598674319575 `&quot; ) &amp;&amp; sleep 0'&quot;'&quot;''
&lt;192.168.33.11&gt; PUT /tmp/tmpDCHXsj TO /home/openstackadmin/.ansible/tmp/ansible-tmp-1464271664.69-10598674319575/rabbitmq_user.py
&lt;192.168.33.11&gt; SSH: EXEC sftp -b - -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=openstackadmin -o ConnectTimeout=10 -o ControlPath=/home/daniel/.ansible/cp/ansible-ssh-%h-%p-%r '[192.168.33.11]'
&lt;192.168.33.11&gt; ESTABLISH SSH CONNECTION FOR USER: openstackadmin
&lt;192.168.33.11&gt; SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=openstackadmin -o ConnectTimeout=10 -o ControlPath=/home/daniel/.ansible/cp/ansible-ssh-%h-%p-%r 192.168.33.11 '/bin/sh -c '&quot;'&quot;'chmod -R u+x /home/openstackadmin/.ansible/tmp/ansible-tmp-1464271664.69-10598674319575/ &amp;&amp; sleep 0'&quot;'&quot;''
&lt;192.168.33.11&gt; ESTABLISH SSH CONNECTION FOR USER: openstackadmin
&lt;192.168.33.11&gt; SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=openstackadmin -o ConnectTimeout=10 -o ControlPath=/home/daniel/.ansible/cp/ansible-ssh-%h-%p-%r -tt 192.168.33.11 '/bin/sh -c '&quot;'&quot;'sudo -H -S -n -u root /bin/sh -c '&quot;'&quot;'&quot;'&quot;'&quot;'&quot;'&quot;'&quot;'echo BECOME-SUCCESS-lcmcxuyhulniwzrxxspkbqiswrciptnq; LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 /usr/bin/python /home/openstackadmin/.ansible/tmp/ansible-tmp-1464271664.69-10598674319575/rabbitmq_user.py; rm -rf &quot;/home/openstackadmin/.ansible/tmp/ansible-tmp-1464271664.69-10598674319575/&quot; &gt; /dev/null 2&gt;&amp;1'&quot;'&quot;'&quot;'&quot;'&quot;'&quot;'&quot;'&quot;' &amp;&amp; sleep 0'&quot;'&quot;''
failed: [control01t] (item={u'vhost': u'/', u'password': u'password', u'user': u'openstack-glance'}) =&gt; {&quot;failed&quot;: true, &quot;invocation&quot;: {&quot;module_name&quot;: &quot;rabbitmq_user&quot;}, &quot;item&quot;: {&quot;password&quot;: &quot;password&quot;, &quot;user&quot;: &quot;openstack-glance&quot;, &quot;vhost&quot;: &quot;/&quot;}, &quot;module_stderr&quot;: &quot;OpenSSH_7.2p2, OpenSSL 1.0.2h  3 May 2016\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 13588\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\nShared connection to 192.168.33.11 closed.\r\n&quot;, &quot;module_stdout&quot;: &quot;Traceback (most recent call last):\r\n  File \&quot;/tmp/ansible_YLKqns/ansible_module_rabbitmq_user.py\&quot;, line 302, in &lt;module&gt;\r\n    main()\r\n  File \&quot;/tmp/ansible_YLKqns/ansible_module_rabbitmq_user.py\&quot;, line 274, in main\r\n    if rabbitmq_user.get():\r\n  File \&quot;/tmp/ansible_YLKqns/ansible_module_rabbitmq_user.py\&quot;, line 155, in get\r\n    users = self._exec(['list_users'], True)\r\n  File \&quot;/tmp/ansible_YLKqns/ansible_module_rabbitmq_user.py\&quot;, line 150, in _exec\r\n    rc, out, err = self.module.run_command(cmd + args, check_rc=True)\r\n  File \&quot;/tmp/ansible_YLKqns/ansible_modlib.zip/ansible/module_utils/basic.py\&quot;, line 1987, in run_command\r\n  File \&quot;/usr/lib/python2.7/posixpath.py\&quot;, line 254, in expanduser\r\n    if not path.startswith('~'):\r\nAttributeError: 'list' object has no attribute 'startswith'\r\n&quot;, &quot;msg&quot;: &quot;MODULE FAILURE&quot;, &quot;parsed&quot;: false}
Using module file /home/daniel/Downloads/ansible/lib/ansible/modules/extras/messaging/rabbitmq_user.py
&lt;192.168.33.11&gt; ESTABLISH SSH CONNECTION FOR USER: openstackadmin
&lt;192.168.33.11&gt; SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=openstackadmin -o ConnectTimeout=10 -o ControlPath=/home/daniel/.ansible/cp/ansible-ssh-%h-%p-%r 192.168.33.11 '/bin/sh -c '&quot;'&quot;'( umask 77 &amp;&amp; mkdir -p &quot;` echo $HOME/.ansible/tmp/ansible-tmp-1464271664.97-84308363939202 `&quot; &amp;&amp; echo ansible-tmp-1464271664.97-84308363939202=&quot;` echo $HOME/.ansible/tmp/ansible-tmp-1464271664.97-84308363939202 `&quot; ) &amp;&amp; sleep 0'&quot;'&quot;''
&lt;192.168.33.11&gt; PUT /tmp/tmpnLcQFI TO /home/openstackadmin/.ansible/tmp/ansible-tmp-1464271664.97-84308363939202/rabbitmq_user.py
&lt;192.168.33.11&gt; SSH: EXEC sftp -b - -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=openstackadmin -o ConnectTimeout=10 -o ControlPath=/home/daniel/.ansible/cp/ansible-ssh-%h-%p-%r '[192.168.33.11]'
&lt;192.168.33.11&gt; ESTABLISH SSH CONNECTION FOR USER: openstackadmin
&lt;192.168.33.11&gt; SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=openstackadmin -o ConnectTimeout=10 -o ControlPath=/home/daniel/.ansible/cp/ansible-ssh-%h-%p-%r 192.168.33.11 '/bin/sh -c '&quot;'&quot;'chmod -R u+x /home/openstackadmin/.ansible/tmp/ansible-tmp-1464271664.97-84308363939202/ &amp;&amp; sleep 0'&quot;'&quot;''
&lt;192.168.33.11&gt; ESTABLISH SSH CONNECTION FOR USER: openstackadmin
&lt;192.168.33.11&gt; SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=openstackadmin -o ConnectTimeout=10 -o ControlPath=/home/daniel/.ansible/cp/ansible-ssh-%h-%p-%r -tt 192.168.33.11 '/bin/sh -c '&quot;'&quot;'sudo -H -S -n -u root /bin/sh -c '&quot;'&quot;'&quot;'&quot;'&quot;'&quot;'&quot;'&quot;'echo BECOME-SUCCESS-qeweypikyceddwcyzvrgqhhikuzjzorn; LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 /usr/bin/python /home/openstackadmin/.ansible/tmp/ansible-tmp-1464271664.97-84308363939202/rabbitmq_user.py; rm -rf &quot;/home/openstackadmin/.ansible/tmp/ansible-tmp-1464271664.97-84308363939202/&quot; &gt; /dev/null 2&gt;&amp;1'&quot;'&quot;'&quot;'&quot;'&quot;'&quot;'&quot;'&quot;' &amp;&amp; sleep 0'&quot;'&quot;''
failed: [control01t] (item={u'vhost': u'/', u'password': u'password', u'user': u'openstack-nova'}) =&gt; {&quot;failed&quot;: true, &quot;invocation&quot;: {&quot;module_name&quot;: &quot;rabbitmq_user&quot;}, &quot;item&quot;: {&quot;password&quot;: &quot;password&quot;, &quot;user&quot;: &quot;openstack-nova&quot;, &quot;vhost&quot;: &quot;/&quot;}, &quot;module_stderr&quot;: &quot;OpenSSH_7.2p2, OpenSSL 1.0.2h  3 May 2016\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 13588\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\nShared connection to 192.168.33.11 closed.\r\n&quot;, &quot;module_stdout&quot;: &quot;Traceback (most recent call last):\r\n  File \&quot;/tmp/ansible_oJbdN0/ansible_module_rabbitmq_user.py\&quot;, line 302, in &lt;module&gt;\r\n    main()\r\n  File \&quot;/tmp/ansible_oJbdN0/ansible_module_rabbitmq_user.py\&quot;, line 274, in main\r\n    if rabbitmq_user.get():\r\n  File \&quot;/tmp/ansible_oJbdN0/ansible_module_rabbitmq_user.py\&quot;, line 155, in get\r\n    users = self._exec(['list_users'], True)\r\n  File \&quot;/tmp/ansible_oJbdN0/ansible_module_rabbitmq_user.py\&quot;, line 150, in _exec\r\n    rc, out, err = self.module.run_command(cmd + args, check_rc=True)\r\n  File \&quot;/tmp/ansible_oJbdN0/ansible_modlib.zip/ansible/module_utils/basic.py\&quot;, line 1987, in run_command\r\n  File \&quot;/usr/lib/python2.7/posixpath.py\&quot;, line 254, in expanduser\r\n    if not path.startswith('~'):\r\nAttributeError: 'list' object has no attribute 'startswith'\r\n&quot;, &quot;msg&quot;: &quot;MODULE FAILURE&quot;, &quot;parsed&quot;: false}"><pre class="notranslate"><code class="notranslate">TASK [add rabbitmq user and set privileges] ************************************
task path: /home/daniel/Documents/openstack/playbook.yml:4
Using module file /home/daniel/Downloads/ansible/lib/ansible/modules/extras/messaging/rabbitmq_user.py
&lt;192.168.33.11&gt; ESTABLISH SSH CONNECTION FOR USER: openstackadmin
&lt;192.168.33.11&gt; SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=openstackadmin -o ConnectTimeout=10 -o ControlPath=/home/daniel/.ansible/cp/ansible-ssh-%h-%p-%r 192.168.33.11 '/bin/sh -c '"'"'( umask 77 &amp;&amp; mkdir -p "` echo $HOME/.ansible/tmp/ansible-tmp-1464271664.69-10598674319575 `" &amp;&amp; echo ansible-tmp-1464271664.69-10598674319575="` echo $HOME/.ansible/tmp/ansible-tmp-1464271664.69-10598674319575 `" ) &amp;&amp; sleep 0'"'"''
&lt;192.168.33.11&gt; PUT /tmp/tmpDCHXsj TO /home/openstackadmin/.ansible/tmp/ansible-tmp-1464271664.69-10598674319575/rabbitmq_user.py
&lt;192.168.33.11&gt; SSH: EXEC sftp -b - -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=openstackadmin -o ConnectTimeout=10 -o ControlPath=/home/daniel/.ansible/cp/ansible-ssh-%h-%p-%r '[192.168.33.11]'
&lt;192.168.33.11&gt; ESTABLISH SSH CONNECTION FOR USER: openstackadmin
&lt;192.168.33.11&gt; SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=openstackadmin -o ConnectTimeout=10 -o ControlPath=/home/daniel/.ansible/cp/ansible-ssh-%h-%p-%r 192.168.33.11 '/bin/sh -c '"'"'chmod -R u+x /home/openstackadmin/.ansible/tmp/ansible-tmp-1464271664.69-10598674319575/ &amp;&amp; sleep 0'"'"''
&lt;192.168.33.11&gt; ESTABLISH SSH CONNECTION FOR USER: openstackadmin
&lt;192.168.33.11&gt; SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=openstackadmin -o ConnectTimeout=10 -o ControlPath=/home/daniel/.ansible/cp/ansible-ssh-%h-%p-%r -tt 192.168.33.11 '/bin/sh -c '"'"'sudo -H -S -n -u root /bin/sh -c '"'"'"'"'"'"'"'"'echo BECOME-SUCCESS-lcmcxuyhulniwzrxxspkbqiswrciptnq; LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 /usr/bin/python /home/openstackadmin/.ansible/tmp/ansible-tmp-1464271664.69-10598674319575/rabbitmq_user.py; rm -rf "/home/openstackadmin/.ansible/tmp/ansible-tmp-1464271664.69-10598674319575/" &gt; /dev/null 2&gt;&amp;1'"'"'"'"'"'"'"'"' &amp;&amp; sleep 0'"'"''
failed: [control01t] (item={u'vhost': u'/', u'password': u'password', u'user': u'openstack-glance'}) =&gt; {"failed": true, "invocation": {"module_name": "rabbitmq_user"}, "item": {"password": "password", "user": "openstack-glance", "vhost": "/"}, "module_stderr": "OpenSSH_7.2p2, OpenSSL 1.0.2h  3 May 2016\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 13588\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\nShared connection to 192.168.33.11 closed.\r\n", "module_stdout": "Traceback (most recent call last):\r\n  File \"/tmp/ansible_YLKqns/ansible_module_rabbitmq_user.py\", line 302, in &lt;module&gt;\r\n    main()\r\n  File \"/tmp/ansible_YLKqns/ansible_module_rabbitmq_user.py\", line 274, in main\r\n    if rabbitmq_user.get():\r\n  File \"/tmp/ansible_YLKqns/ansible_module_rabbitmq_user.py\", line 155, in get\r\n    users = self._exec(['list_users'], True)\r\n  File \"/tmp/ansible_YLKqns/ansible_module_rabbitmq_user.py\", line 150, in _exec\r\n    rc, out, err = self.module.run_command(cmd + args, check_rc=True)\r\n  File \"/tmp/ansible_YLKqns/ansible_modlib.zip/ansible/module_utils/basic.py\", line 1987, in run_command\r\n  File \"/usr/lib/python2.7/posixpath.py\", line 254, in expanduser\r\n    if not path.startswith('~'):\r\nAttributeError: 'list' object has no attribute 'startswith'\r\n", "msg": "MODULE FAILURE", "parsed": false}
Using module file /home/daniel/Downloads/ansible/lib/ansible/modules/extras/messaging/rabbitmq_user.py
&lt;192.168.33.11&gt; ESTABLISH SSH CONNECTION FOR USER: openstackadmin
&lt;192.168.33.11&gt; SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=openstackadmin -o ConnectTimeout=10 -o ControlPath=/home/daniel/.ansible/cp/ansible-ssh-%h-%p-%r 192.168.33.11 '/bin/sh -c '"'"'( umask 77 &amp;&amp; mkdir -p "` echo $HOME/.ansible/tmp/ansible-tmp-1464271664.97-84308363939202 `" &amp;&amp; echo ansible-tmp-1464271664.97-84308363939202="` echo $HOME/.ansible/tmp/ansible-tmp-1464271664.97-84308363939202 `" ) &amp;&amp; sleep 0'"'"''
&lt;192.168.33.11&gt; PUT /tmp/tmpnLcQFI TO /home/openstackadmin/.ansible/tmp/ansible-tmp-1464271664.97-84308363939202/rabbitmq_user.py
&lt;192.168.33.11&gt; SSH: EXEC sftp -b - -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=openstackadmin -o ConnectTimeout=10 -o ControlPath=/home/daniel/.ansible/cp/ansible-ssh-%h-%p-%r '[192.168.33.11]'
&lt;192.168.33.11&gt; ESTABLISH SSH CONNECTION FOR USER: openstackadmin
&lt;192.168.33.11&gt; SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=openstackadmin -o ConnectTimeout=10 -o ControlPath=/home/daniel/.ansible/cp/ansible-ssh-%h-%p-%r 192.168.33.11 '/bin/sh -c '"'"'chmod -R u+x /home/openstackadmin/.ansible/tmp/ansible-tmp-1464271664.97-84308363939202/ &amp;&amp; sleep 0'"'"''
&lt;192.168.33.11&gt; ESTABLISH SSH CONNECTION FOR USER: openstackadmin
&lt;192.168.33.11&gt; SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=openstackadmin -o ConnectTimeout=10 -o ControlPath=/home/daniel/.ansible/cp/ansible-ssh-%h-%p-%r -tt 192.168.33.11 '/bin/sh -c '"'"'sudo -H -S -n -u root /bin/sh -c '"'"'"'"'"'"'"'"'echo BECOME-SUCCESS-qeweypikyceddwcyzvrgqhhikuzjzorn; LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 /usr/bin/python /home/openstackadmin/.ansible/tmp/ansible-tmp-1464271664.97-84308363939202/rabbitmq_user.py; rm -rf "/home/openstackadmin/.ansible/tmp/ansible-tmp-1464271664.97-84308363939202/" &gt; /dev/null 2&gt;&amp;1'"'"'"'"'"'"'"'"' &amp;&amp; sleep 0'"'"''
failed: [control01t] (item={u'vhost': u'/', u'password': u'password', u'user': u'openstack-nova'}) =&gt; {"failed": true, "invocation": {"module_name": "rabbitmq_user"}, "item": {"password": "password", "user": "openstack-nova", "vhost": "/"}, "module_stderr": "OpenSSH_7.2p2, OpenSSL 1.0.2h  3 May 2016\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 13588\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\nShared connection to 192.168.33.11 closed.\r\n", "module_stdout": "Traceback (most recent call last):\r\n  File \"/tmp/ansible_oJbdN0/ansible_module_rabbitmq_user.py\", line 302, in &lt;module&gt;\r\n    main()\r\n  File \"/tmp/ansible_oJbdN0/ansible_module_rabbitmq_user.py\", line 274, in main\r\n    if rabbitmq_user.get():\r\n  File \"/tmp/ansible_oJbdN0/ansible_module_rabbitmq_user.py\", line 155, in get\r\n    users = self._exec(['list_users'], True)\r\n  File \"/tmp/ansible_oJbdN0/ansible_module_rabbitmq_user.py\", line 150, in _exec\r\n    rc, out, err = self.module.run_command(cmd + args, check_rc=True)\r\n  File \"/tmp/ansible_oJbdN0/ansible_modlib.zip/ansible/module_utils/basic.py\", line 1987, in run_command\r\n  File \"/usr/lib/python2.7/posixpath.py\", line 254, in expanduser\r\n    if not path.startswith('~'):\r\nAttributeError: 'list' object has no attribute 'startswith'\r\n", "msg": "MODULE FAILURE", "parsed": false}
</code></pre></div>
<p dir="auto">Pretty print of the python error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Traceback (most recent call last):
  File &quot;/tmp/ansible_YLKqns/ansible_module_rabbitmq_user.py&quot;, line 302, in &lt;module&gt;
    main()
  File &quot;/tmp/ansible_YLKqns/ansible_module_rabbitmq_user.py&quot;, line 274, in main
    if rabbitmq_user.get():
  File &quot;/tmp/ansible_YLKqns/ansible_module_rabbitmq_user.py&quot;, line 155, in get
    users = self._exec(['list_users'], True)
  File &quot;/tmp/ansible_YLKqns/ansible_module_rabbitmq_user.py&quot;, line 150, in _exec
    rc, out, err = self.module.run_command(cmd + args, check_rc=True)
  File &quot;/tmp/ansible_YLKqns/ansible_modlib.zip/ansible/module_utils/basic.py&quot;, line 1987, in run_command
  File &quot;/usr/lib/python2.7/posixpath.py&quot;, line 254, in expanduser
    if not path.startswith('~'):
AttributeError: 'list' object has no attribute 'startswith'"><pre class="notranslate"><code class="notranslate">Traceback (most recent call last):
  File "/tmp/ansible_YLKqns/ansible_module_rabbitmq_user.py", line 302, in &lt;module&gt;
    main()
  File "/tmp/ansible_YLKqns/ansible_module_rabbitmq_user.py", line 274, in main
    if rabbitmq_user.get():
  File "/tmp/ansible_YLKqns/ansible_module_rabbitmq_user.py", line 155, in get
    users = self._exec(['list_users'], True)
  File "/tmp/ansible_YLKqns/ansible_module_rabbitmq_user.py", line 150, in _exec
    rc, out, err = self.module.run_command(cmd + args, check_rc=True)
  File "/tmp/ansible_YLKqns/ansible_modlib.zip/ansible/module_utils/basic.py", line 1987, in run_command
  File "/usr/lib/python2.7/posixpath.py", line 254, in expanduser
    if not path.startswith('~'):
AttributeError: 'list' object has no attribute 'startswith'
</code></pre></div>
<h2 dir="auto">Version:</h2>
<p dir="auto">ansible-playbook 2.0.0 (devel <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/ansible/ansible/commit/8f77dd1cf2e1c6538b3f0081d39a29dfce93bcf1/hovercard" href="https://github.com/ansible/ansible/commit/8f77dd1cf2e1c6538b3f0081d39a29dfce93bcf1"><tt>8f77dd1</tt></a>) last updated 2015/10/26 11:46:26 (GMT -400)<br>
lib/ansible/modules/core: (detached HEAD <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/ansible/ansible/commit/06f301b05b384c0a8e81b92c5c2333b2e66e2767/hovercard" href="https://github.com/ansible/ansible/commit/06f301b05b384c0a8e81b92c5c2333b2e66e2767"><tt>06f301b</tt></a>) last updated 2015/10/26 11:46:28 (GMT -400)<br>
lib/ansible/modules/extras: (detached HEAD <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/ansible/ansible/commit/405c3cb2c72411be395e50106b1bddd2f4fb4fda/hovercard" href="https://github.com/ansible/ansible/commit/405c3cb2c72411be395e50106b1bddd2f4fb4fda"><tt>405c3cb</tt></a>) last updated 2015/10/26 11:46:30 (GMT -400)</p>
<h2 dir="auto">Issue:</h2>
<p dir="auto">When the server is not online, the error message is confusing.</p>
<h2 dir="auto">What happens now:</h2>
<p dir="auto">Get the error message:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="fatal: [10.10.67.157]: FAILED! =&gt; {&quot;failed&quot;: true, &quot;msg&quot;: &quot;ERROR! Timeout (10s) waiting for privilege escalation prompt: &quot;}"><pre class="notranslate"><code class="notranslate">fatal: [10.10.67.157]: FAILED! =&gt; {"failed": true, "msg": "ERROR! Timeout (10s) waiting for privilege escalation prompt: "}
</code></pre></div>
<h2 dir="auto">What should happen:</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="fatal: [10.10.67.157]: FAILED! =&gt; {&quot;failed&quot;: true, &quot;msg&quot;: &quot;ERROR! Unable to connect to server &quot;}"><pre class="notranslate"><code class="notranslate">fatal: [10.10.67.157]: FAILED! =&gt; {"failed": true, "msg": "ERROR! Unable to connect to server "}
</code></pre></div>