Calling eddyhub.gnome_shell role (from ansible galaxy) from another role
<p>I want to install gnome extensions in an ansible playbook and found this: <a href="https://galaxy.ansible.com/eddyhub/gnome_shell/" rel="nofollow">https://galaxy.ansible.com/eddyhub/gnome_shell/</a> nice!</p>

<p>The way I am organzing my playbook, I would like to call the role from within another task, so I created a task like this (this is the complete task file, located at (roles/common/tasks/gnome.yaml):</p>

<pre><code>dependencies:
   - { role: eddyhub.gnome_shell, gnome_extension_path: /home/nathanhuesken/.local/share/gnome-shell/extensions/, gnome_extension_owner: nathanhuesken, gnome_shell_extensions: [442] }
</code></pre>

<p>But running the playbook, I get this error:</p>

<pre><code>ERROR! Unexpected Exception: global name 'AnsibleError' is not defined
the full traceback was:

Traceback (most recent call last):
  File "/usr/bin/ansible-playbook", line 92, in &lt;module&gt;
    exit_code = cli.run()
  File "/usr/lib/python2.7/site-packages/ansible/cli/playbook.py", line 154, in run
    results = pbex.run()
  File "/usr/lib/python2.7/site-packages/ansible/executor/playbook_executor.py", line 73, in run
    pb = Playbook.load(playbook_path, variable_manager=self._variable_manager, loader=self._loader)
  File "/usr/lib/python2.7/site-packages/ansible/playbook/__init__.py", line 53, in load
    pb._load_playbook_data(file_name=file_name, variable_manager=variable_manager)
  File "/usr/lib/python2.7/site-packages/ansible/playbook/__init__.py", line 98, in _load_playbook_data
    entry_obj = Play.load(entry, variable_manager=variable_manager, loader=self._loader)
  File "/usr/lib/python2.7/site-packages/ansible/playbook/play.py", line 115, in load
    return p.load_data(data, variable_manager=variable_manager, loader=loader)
  File "/usr/lib/python2.7/site-packages/ansible/playbook/base.py", line 206, in load_data
    self._attributes[name] = method(name, ds[name])
  File "/usr/lib/python2.7/site-packages/ansible/playbook/play.py", line 217, in _load_roles
    roles.append(Role.load(ri, play=self))
  File "/usr/lib/python2.7/site-packages/ansible/playbook/role/__init__.py", line 116, in load
    r._load_role_data(role_include, parent_role=parent_role)
  File "/usr/lib/python2.7/site-packages/ansible/playbook/role/__init__.py", line 169, in _load_role_data
    self._task_blocks = load_list_of_blocks(task_data, play=self._play, role=self, loader=self._loader, variable_manager=self._variable_manager)
  File "/usr/lib/python2.7/site-packages/ansible/playbook/helpers.py", line 58, in load_list_of_blocks
    loader=loader
  File "/usr/lib/python2.7/site-packages/ansible/playbook/block.py", line 79, in load
    return b.load_data(data, variable_manager=variable_manager, loader=loader)
  File "/usr/lib/python2.7/site-packages/ansible/playbook/base.py", line 206, in load_data
    self._attributes[name] = method(name, ds[name])
  File "/usr/lib/python2.7/site-packages/ansible/playbook/block.py", line 115, in _load_block
    use_handlers=self._use_handlers,
  File "/usr/lib/python2.7/site-packages/ansible/playbook/helpers.py", line 178, in load_list_of_tasks
    raise AnsibleError("included task files must contain a list of tasks", obj=data)
NameError: global name 'AnsibleError' is not defined
</code></pre>

<p>What am I doing wrong?</p>