We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
rabbitmq_user fails when no password provided
Even though the `password` param is specified as optional, the `rabbitmq_user` module fails when it is not provided.

```
Stacktrace:
  File "<stdin>", line 1595, in <module>
  File "<stdin>", line 240, in main
  File "<stdin>", line 165, in add
  File "<stdin>", line 131, in _exec
  File "<stdin>", line 1448, in run_command
  File "/usr/lib/python2.7/posixpath.py", line 261, in expanduser
    if not path.startswith('~'):
AttributeError: 'NoneType' object has no attribute 'startswith'
```

The bug is [right here](https://github.com/ansible/ansible-modules-extras/blob/a0df36c6ab257281cbaae00b8a4590200802f571/messaging/rabbitmq_user.py#L165). I might  send a PR when I get the time to fork and test.


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `messaging/rabbitmq_user.py`
Content:
```
1 #!/usr/bin/python
2 # -*- coding: utf-8 -*-
3 
4 # (c) 2013, Chatham Financial <oss@chathamfinancial.com>
5 #
6 # This file is part of Ansible
7 #
8 # Ansible is free software: you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation, either version 3 of the License, or
11 # (at your option) any later version.
12 #
13 # Ansible is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 # GNU General Public License for more details.
17 #
18 # You should have received a copy of the GNU General Public License
19 # along with Ansible.  If not, see <http://www.gnu.org/licenses/>.
20 
21 DOCUMENTATION = '''
22 ---
23 module: rabbitmq_user
24 short_description: Adds or removes users to RabbitMQ
25 description:
26   - Add or remove users to RabbitMQ and assign permissions
27 version_added: "1.1"
28 author: Chris Hoffman
29 options:
30   user:
31     description:
32       - Name of user to add
33     required: true
34     default: null
35     aliases: [username, name]
36   password:
37     description:
38       - Password of user to add.
39       - To change the password of an existing user, you must also specify
40         C(force=yes).
41     required: false
42     default: null
43   tags:
44     description:
45       - User tags specified as comma delimited
46     required: false
47     default: null
48   vhost:
49     description:
50       - vhost to apply access privileges.
51     required: false
52     default: /
53   node:
54     description:
55       - erlang node name of the rabbit we wish to configure
56     required: false
57     default: rabbit
58     version_added: "1.2"
59   configure_priv:
60     description:
61       - Regular expression to restrict configure actions on a resource
62         for the specified vhost.
63       - By default all actions are restricted.
64     required: false
65     default: ^$
66   write_priv:
67     description:
68       - Regular expression to restrict configure actions on a resource
69         for the specified vhost.
70       - By default all actions are restricted.
71     required: false
72     default: ^$
73   read_priv:
74     description:
75       - Regular expression to restrict configure actions on a resource
76         for the specified vhost.
77       - By default all actions are restricted.
78     required: false
79     default: ^$
80   force:
81     description:
82       - Deletes and recreates the user.
83     required: false
84     default: "no"
85     choices: [ "yes", "no" ]
86   state:
87     description:
88       - Specify if user is to be added or removed
89     required: false
90     default: present
91     choices: [present, absent]
92 '''
93 
94 EXAMPLES = '''
95 # Add user to server and assign full access control
96 - rabbitmq_user: user=joe
97                  password=changeme
98                  vhost=/
99                  configure_priv=.*
100                  read_priv=.*
101                  write_priv=.*
102                  state=present
103 '''
104 
105 class RabbitMqUser(object):
106     def __init__(self, module, username, password, tags, vhost, configure_priv, write_priv, read_priv, node):
107         self.module = module
108         self.username = username
109         self.password = password
110         self.node = node
111         if tags is None:
112             self.tags = list()
113         else:
114             self.tags = tags.split(',')
115 
116         permissions = dict(
117             vhost=vhost,
118             configure_priv=configure_priv,
119             write_priv=write_priv,
120             read_priv=read_priv
121         )
122         self.permissions = permissions
123 
124         self._tags = None
125         self._permissions = None
126         self._rabbitmqctl = module.get_bin_path('rabbitmqctl', True)
127 
128     def _exec(self, args, run_in_check_mode=False):
129         if not self.module.check_mode or (self.module.check_mode and run_in_check_mode):
130             cmd = [self._rabbitmqctl, '-q', '-n', self.node]
131             rc, out, err = self.module.run_command(cmd + args, check_rc=True)
132             return out.splitlines()
133         return list()
134 
135     def get(self):
136         users = self._exec(['list_users'], True)
137 
138         for user_tag in users:
139             user, tags = user_tag.split('\t')
140 
141             if user == self.username:
142                 for c in ['[',']',' ']:
143                     tags = tags.replace(c, '')
144 
145                 if tags != '':
146                     self._tags = tags.split(',')
147                 else:
148                     self._tags = list()
149 
150                 self._permissions = self._get_permissions()
151                 return True
152         return False
153 
154     def _get_permissions(self):
155         perms_out = self._exec(['list_user_permissions', self.username], True)
156 
157         for perm in perms_out:
158             vhost, configure_priv, write_priv, read_priv = perm.split('\t')
159             if vhost == self.permissions['vhost']:
160                 return dict(vhost=vhost, configure_priv=configure_priv, write_priv=write_priv, read_priv=read_priv)
161 
162         return dict()
163 
164     def add(self):
165         self._exec(['add_user', self.username, self.password])
166 
167     def delete(self):
168         self._exec(['delete_user', self.username])
169 
170     def set_tags(self):
171         self._exec(['set_user_tags', self.username] + self.tags)
172 
173     def set_permissions(self):
174         cmd = ['set_permissions']
175         cmd.append('-p')
176         cmd.append(self.permissions['vhost'])
177         cmd.append(self.username)
178         cmd.append(self.permissions['configure_priv'])
179         cmd.append(self.permissions['write_priv'])
180         cmd.append(self.permissions['read_priv'])
181         self._exec(cmd)
182 
183     def has_tags_modifications(self):
184         return set(self.tags) != set(self._tags)
185 
186     def has_permissions_modifications(self):
187         return self._permissions != self.permissions
188 
189 def main():
190     arg_spec = dict(
191         user=dict(required=True, aliases=['username', 'name']),
192         password=dict(default=None),
193         tags=dict(default=None),
194         vhost=dict(default='/'),
195         configure_priv=dict(default='^$'),
196         write_priv=dict(default='^$'),
197         read_priv=dict(default='^$'),
198         force=dict(default='no', type='bool'),
199         state=dict(default='present', choices=['present', 'absent']),
200         node=dict(default='rabbit')
201     )
202     module = AnsibleModule(
203         argument_spec=arg_spec,
204         supports_check_mode=True
205     )
206 
207     username = module.params['user']
208     password = module.params['password']
209     tags = module.params['tags']
210     vhost = module.params['vhost']
211     configure_priv = module.params['configure_priv']
212     write_priv = module.params['write_priv']
213     read_priv = module.params['read_priv']
214     force = module.params['force']
215     state = module.params['state']
216     node = module.params['node']
217 
218     rabbitmq_user = RabbitMqUser(module, username, password, tags, vhost, configure_priv, write_priv, read_priv, node)
219 
220     changed = False
221     if rabbitmq_user.get():
222         if state == 'absent':
223             rabbitmq_user.delete()
224             changed = True
225         else:
226             if force:
227                 rabbitmq_user.delete()
228                 rabbitmq_user.add()
229                 rabbitmq_user.get()
230                 changed = True
231 
232             if rabbitmq_user.has_tags_modifications():
233                 rabbitmq_user.set_tags()
234                 changed = True
235 
236             if rabbitmq_user.has_permissions_modifications():
237                 rabbitmq_user.set_permissions()
238                 changed = True
239     elif state == 'present':
240         rabbitmq_user.add()
241         rabbitmq_user.set_tags()
242         rabbitmq_user.set_permissions()
243         changed = True
244 
245     module.exit_json(changed=changed, user=username, state=state)
246 
247 # import module snippets
248 from ansible.module_utils.basic import *
249 main()
250
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/messaging/rabbitmq_user.py b/messaging/rabbitmq_user.py
--- a/messaging/rabbitmq_user.py
+++ b/messaging/rabbitmq_user.py
@@ -162,7 +162,11 @@
         return dict()
 
     def add(self):
-        self._exec(['add_user', self.username, self.password])
+        if self.password is not None:
+            self._exec(['add_user', self.username, self.password])
+        else
+            self._exec(['add_user', self.username, ''])
+            self._exec(['clear_password', self.username])
 
     def delete(self):
         self._exec(['delete_user', self.username])

{"golden_diff": "diff --git a/messaging/rabbitmq_user.py b/messaging/rabbitmq_user.py\n--- a/messaging/rabbitmq_user.py\n+++ b/messaging/rabbitmq_user.py\n@@ -162,7 +162,11 @@\n         return dict()\n \n     def add(self):\n-        self._exec(['add_user', self.username, self.password])\n+        if self.password is not None:\n+            self._exec(['add_user', self.username, self.password])\n+        else\n+            self._exec(['add_user', self.username, ''])\n+            self._exec(['clear_password', self.username])\n \n     def delete(self):\n         self._exec(['delete_user', self.username])\n", "issue": "rabbitmq_user fails when no password provided\nEven though the `password` param is specified as optional, the `rabbitmq_user` module fails when it is not provided.\n\n```\nStacktrace:\n  File \"<stdin>\", line 1595, in <module>\n  File \"<stdin>\", line 240, in main\n  File \"<stdin>\", line 165, in add\n  File \"<stdin>\", line 131, in _exec\n  File \"<stdin>\", line 1448, in run_command\n  File \"/usr/lib/python2.7/posixpath.py\", line 261, in expanduser\n    if not path.startswith('~'):\nAttributeError: 'NoneType' object has no attribute 'startswith'\n```\n\nThe bug is [right here](https://github.com/ansible/ansible-modules-extras/blob/a0df36c6ab257281cbaae00b8a4590200802f571/messaging/rabbitmq_user.py#L165). I might  send a PR when I get the time to fork and test.\n\n", "before_files": [{"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# (c) 2013, Chatham Financial <oss@chathamfinancial.com>\n#\n# This file is part of Ansible\n#\n# Ansible is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, either version 3 of the License, or\n# (at your option) any later version.\n#\n# Ansible is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n# GNU General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with Ansible.  If not, see <http://www.gnu.org/licenses/>.\n\nDOCUMENTATION = '''\n---\nmodule: rabbitmq_user\nshort_description: Adds or removes users to RabbitMQ\ndescription:\n  - Add or remove users to RabbitMQ and assign permissions\nversion_added: \"1.1\"\nauthor: Chris Hoffman\noptions:\n  user:\n    description:\n      - Name of user to add\n    required: true\n    default: null\n    aliases: [username, name]\n  password:\n    description:\n      - Password of user to add.\n      - To change the password of an existing user, you must also specify\n        C(force=yes).\n    required: false\n    default: null\n  tags:\n    description:\n      - User tags specified as comma delimited\n    required: false\n    default: null\n  vhost:\n    description:\n      - vhost to apply access privileges.\n    required: false\n    default: /\n  node:\n    description:\n      - erlang node name of the rabbit we wish to configure\n    required: false\n    default: rabbit\n    version_added: \"1.2\"\n  configure_priv:\n    description:\n      - Regular expression to restrict configure actions on a resource\n        for the specified vhost.\n      - By default all actions are restricted.\n    required: false\n    default: ^$\n  write_priv:\n    description:\n      - Regular expression to restrict configure actions on a resource\n        for the specified vhost.\n      - By default all actions are restricted.\n    required: false\n    default: ^$\n  read_priv:\n    description:\n      - Regular expression to restrict configure actions on a resource\n        for the specified vhost.\n      - By default all actions are restricted.\n    required: false\n    default: ^$\n  force:\n    description:\n      - Deletes and recreates the user.\n    required: false\n    default: \"no\"\n    choices: [ \"yes\", \"no\" ]\n  state:\n    description:\n      - Specify if user is to be added or removed\n    required: false\n    default: present\n    choices: [present, absent]\n'''\n\nEXAMPLES = '''\n# Add user to server and assign full access control\n- rabbitmq_user: user=joe\n                 password=changeme\n                 vhost=/\n                 configure_priv=.*\n                 read_priv=.*\n                 write_priv=.*\n                 state=present\n'''\n\nclass RabbitMqUser(object):\n    def __init__(self, module, username, password, tags, vhost, configure_priv, write_priv, read_priv, node):\n        self.module = module\n        self.username = username\n        self.password = password\n        self.node = node\n        if tags is None:\n            self.tags = list()\n        else:\n            self.tags = tags.split(',')\n\n        permissions = dict(\n            vhost=vhost,\n            configure_priv=configure_priv,\n            write_priv=write_priv,\n            read_priv=read_priv\n        )\n        self.permissions = permissions\n\n        self._tags = None\n        self._permissions = None\n        self._rabbitmqctl = module.get_bin_path('rabbitmqctl', True)\n\n    def _exec(self, args, run_in_check_mode=False):\n        if not self.module.check_mode or (self.module.check_mode and run_in_check_mode):\n            cmd = [self._rabbitmqctl, '-q', '-n', self.node]\n            rc, out, err = self.module.run_command(cmd + args, check_rc=True)\n            return out.splitlines()\n        return list()\n\n    def get(self):\n        users = self._exec(['list_users'], True)\n\n        for user_tag in users:\n            user, tags = user_tag.split('\\t')\n\n            if user == self.username:\n                for c in ['[',']',' ']:\n                    tags = tags.replace(c, '')\n\n                if tags != '':\n                    self._tags = tags.split(',')\n                else:\n                    self._tags = list()\n\n                self._permissions = self._get_permissions()\n                return True\n        return False\n\n    def _get_permissions(self):\n        perms_out = self._exec(['list_user_permissions', self.username], True)\n\n        for perm in perms_out:\n            vhost, configure_priv, write_priv, read_priv = perm.split('\\t')\n            if vhost == self.permissions['vhost']:\n                return dict(vhost=vhost, configure_priv=configure_priv, write_priv=write_priv, read_priv=read_priv)\n\n        return dict()\n\n    def add(self):\n        self._exec(['add_user', self.username, self.password])\n\n    def delete(self):\n        self._exec(['delete_user', self.username])\n\n    def set_tags(self):\n        self._exec(['set_user_tags', self.username] + self.tags)\n\n    def set_permissions(self):\n        cmd = ['set_permissions']\n        cmd.append('-p')\n        cmd.append(self.permissions['vhost'])\n        cmd.append(self.username)\n        cmd.append(self.permissions['configure_priv'])\n        cmd.append(self.permissions['write_priv'])\n        cmd.append(self.permissions['read_priv'])\n        self._exec(cmd)\n\n    def has_tags_modifications(self):\n        return set(self.tags) != set(self._tags)\n\n    def has_permissions_modifications(self):\n        return self._permissions != self.permissions\n\ndef main():\n    arg_spec = dict(\n        user=dict(required=True, aliases=['username', 'name']),\n        password=dict(default=None),\n        tags=dict(default=None),\n        vhost=dict(default='/'),\n        configure_priv=dict(default='^$'),\n        write_priv=dict(default='^$'),\n        read_priv=dict(default='^$'),\n        force=dict(default='no', type='bool'),\n        state=dict(default='present', choices=['present', 'absent']),\n        node=dict(default='rabbit')\n    )\n    module = AnsibleModule(\n        argument_spec=arg_spec,\n        supports_check_mode=True\n    )\n\n    username = module.params['user']\n    password = module.params['password']\n    tags = module.params['tags']\n    vhost = module.params['vhost']\n    configure_priv = module.params['configure_priv']\n    write_priv = module.params['write_priv']\n    read_priv = module.params['read_priv']\n    force = module.params['force']\n    state = module.params['state']\n    node = module.params['node']\n\n    rabbitmq_user = RabbitMqUser(module, username, password, tags, vhost, configure_priv, write_priv, read_priv, node)\n\n    changed = False\n    if rabbitmq_user.get():\n        if state == 'absent':\n            rabbitmq_user.delete()\n            changed = True\n        else:\n            if force:\n                rabbitmq_user.delete()\n                rabbitmq_user.add()\n                rabbitmq_user.get()\n                changed = True\n\n            if rabbitmq_user.has_tags_modifications():\n                rabbitmq_user.set_tags()\n                changed = True\n\n            if rabbitmq_user.has_permissions_modifications():\n                rabbitmq_user.set_permissions()\n                changed = True\n    elif state == 'present':\n        rabbitmq_user.add()\n        rabbitmq_user.set_tags()\n        rabbitmq_user.set_permissions()\n        changed = True\n\n    module.exit_json(changed=changed, user=username, state=state)\n\n# import module snippets\nfrom ansible.module_utils.basic import *\nmain()\n", "path": "messaging/rabbitmq_user.py"}], "after_files": [{"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# (c) 2013, Chatham Financial <oss@chathamfinancial.com>\n#\n# This file is part of Ansible\n#\n# Ansible is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, either version 3 of the License, or\n# (at your option) any later version.\n#\n# Ansible is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n# GNU General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with Ansible.  If not, see <http://www.gnu.org/licenses/>.\n\nDOCUMENTATION = '''\n---\nmodule: rabbitmq_user\nshort_description: Adds or removes users to RabbitMQ\ndescription:\n  - Add or remove users to RabbitMQ and assign permissions\nversion_added: \"1.1\"\nauthor: Chris Hoffman\noptions:\n  user:\n    description:\n      - Name of user to add\n    required: true\n    default: null\n    aliases: [username, name]\n  password:\n    description:\n      - Password of user to add.\n      - To change the password of an existing user, you must also specify\n        C(force=yes).\n    required: false\n    default: null\n  tags:\n    description:\n      - User tags specified as comma delimited\n    required: false\n    default: null\n  vhost:\n    description:\n      - vhost to apply access privileges.\n    required: false\n    default: /\n  node:\n    description:\n      - erlang node name of the rabbit we wish to configure\n    required: false\n    default: rabbit\n    version_added: \"1.2\"\n  configure_priv:\n    description:\n      - Regular expression to restrict configure actions on a resource\n        for the specified vhost.\n      - By default all actions are restricted.\n    required: false\n    default: ^$\n  write_priv:\n    description:\n      - Regular expression to restrict configure actions on a resource\n        for the specified vhost.\n      - By default all actions are restricted.\n    required: false\n    default: ^$\n  read_priv:\n    description:\n      - Regular expression to restrict configure actions on a resource\n        for the specified vhost.\n      - By default all actions are restricted.\n    required: false\n    default: ^$\n  force:\n    description:\n      - Deletes and recreates the user.\n    required: false\n    default: \"no\"\n    choices: [ \"yes\", \"no\" ]\n  state:\n    description:\n      - Specify if user is to be added or removed\n    required: false\n    default: present\n    choices: [present, absent]\n'''\n\nEXAMPLES = '''\n# Add user to server and assign full access control\n- rabbitmq_user: user=joe\n                 password=changeme\n                 vhost=/\n                 configure_priv=.*\n                 read_priv=.*\n                 write_priv=.*\n                 state=present\n'''\n\nclass RabbitMqUser(object):\n    def __init__(self, module, username, password, tags, vhost, configure_priv, write_priv, read_priv, node):\n        self.module = module\n        self.username = username\n        self.password = password\n        self.node = node\n        if tags is None:\n            self.tags = list()\n        else:\n            self.tags = tags.split(',')\n\n        permissions = dict(\n            vhost=vhost,\n            configure_priv=configure_priv,\n            write_priv=write_priv,\n            read_priv=read_priv\n        )\n        self.permissions = permissions\n\n        self._tags = None\n        self._permissions = None\n        self._rabbitmqctl = module.get_bin_path('rabbitmqctl', True)\n\n    def _exec(self, args, run_in_check_mode=False):\n        if not self.module.check_mode or (self.module.check_mode and run_in_check_mode):\n            cmd = [self._rabbitmqctl, '-q', '-n', self.node]\n            rc, out, err = self.module.run_command(cmd + args, check_rc=True)\n            return out.splitlines()\n        return list()\n\n    def get(self):\n        users = self._exec(['list_users'], True)\n\n        for user_tag in users:\n            user, tags = user_tag.split('\\t')\n\n            if user == self.username:\n                for c in ['[',']',' ']:\n                    tags = tags.replace(c, '')\n\n                if tags != '':\n                    self._tags = tags.split(',')\n                else:\n                    self._tags = list()\n\n                self._permissions = self._get_permissions()\n                return True\n        return False\n\n    def _get_permissions(self):\n        perms_out = self._exec(['list_user_permissions', self.username], True)\n\n        for perm in perms_out:\n            vhost, configure_priv, write_priv, read_priv = perm.split('\\t')\n            if vhost == self.permissions['vhost']:\n                return dict(vhost=vhost, configure_priv=configure_priv, write_priv=write_priv, read_priv=read_priv)\n\n        return dict()\n\n    def add(self):\n        if self.password is not None:\n            self._exec(['add_user', self.username, self.password])\n        else\n            self._exec(['add_user', self.username, ''])\n            self._exec(['clear_password', self.username])\n\n    def delete(self):\n        self._exec(['delete_user', self.username])\n\n    def set_tags(self):\n        self._exec(['set_user_tags', self.username] + self.tags)\n\n    def set_permissions(self):\n        cmd = ['set_permissions']\n        cmd.append('-p')\n        cmd.append(self.permissions['vhost'])\n        cmd.append(self.username)\n        cmd.append(self.permissions['configure_priv'])\n        cmd.append(self.permissions['write_priv'])\n        cmd.append(self.permissions['read_priv'])\n        self._exec(cmd)\n\n    def has_tags_modifications(self):\n        return set(self.tags) != set(self._tags)\n\n    def has_permissions_modifications(self):\n        return self._permissions != self.permissions\n\ndef main():\n    arg_spec = dict(\n        user=dict(required=True, aliases=['username', 'name']),\n        password=dict(default=None),\n        tags=dict(default=None),\n        vhost=dict(default='/'),\n        configure_priv=dict(default='^$'),\n        write_priv=dict(default='^$'),\n        read_priv=dict(default='^$'),\n        force=dict(default='no', type='bool'),\n        state=dict(default='present', choices=['present', 'absent']),\n        node=dict(default='rabbit')\n    )\n    module = AnsibleModule(\n        argument_spec=arg_spec,\n        supports_check_mode=True\n    )\n\n    username = module.params['user']\n    password = module.params['password']\n    tags = module.params['tags']\n    vhost = module.params['vhost']\n    configure_priv = module.params['configure_priv']\n    write_priv = module.params['write_priv']\n    read_priv = module.params['read_priv']\n    force = module.params['force']\n    state = module.params['state']\n    node = module.params['node']\n\n    rabbitmq_user = RabbitMqUser(module, username, password, tags, vhost, configure_priv, write_priv, read_priv, node)\n\n    changed = False\n    if rabbitmq_user.get():\n        if state == 'absent':\n            rabbitmq_user.delete()\n            changed = True\n        else:\n            if force:\n                rabbitmq_user.delete()\n                rabbitmq_user.add()\n                rabbitmq_user.get()\n                changed = True\n\n            if rabbitmq_user.has_tags_modifications():\n                rabbitmq_user.set_tags()\n                changed = True\n\n            if rabbitmq_user.has_permissions_modifications():\n                rabbitmq_user.set_permissions()\n                changed = True\n    elif state == 'present':\n        rabbitmq_user.add()\n        rabbitmq_user.set_tags()\n        rabbitmq_user.set_permissions()\n        changed = True\n\n    module.exit_json(changed=changed, user=username, state=state)\n\n# import module snippets\nfrom ansible.module_utils.basic import *\nmain()\n", "path": "messaging/rabbitmq_user.py"}]}