<h5 dir="auto">Issue Type:</h5>
<p dir="auto">Bug Report</p>
<h5 dir="auto">Ansible Version:</h5>
<p dir="auto">$ ansible --version<br>
ansible 2.0.0 (devel <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/ansible/ansible/commit/a5dfb35301ad7f6fed64255e794a54116cb520d9/hovercard" href="https://github.com/ansible/ansible/commit/a5dfb35301ad7f6fed64255e794a54116cb520d9"><tt>a5dfb35</tt></a>) last updated 2015/06/29 16:02:56 (GMT -500)<br>
lib/ansible/modules/core: (detached HEAD <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/ansible/ansible/commit/50912c9092eb567c5dc61c47eecd2ccc585ae364/hovercard" href="https://github.com/ansible/ansible/commit/50912c9092eb567c5dc61c47eecd2ccc585ae364"><tt>50912c9</tt></a>) last updated 2015/06/25 13:21:33 (GMT -500)<br>
lib/ansible/modules/extras: (detached HEAD <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/ansible/ansible/commit/dec7d95d514ca89c2784b63d836dd6fb872bdd9c/hovercard" href="https://github.com/ansible/ansible/commit/dec7d95d514ca89c2784b63d836dd6fb872bdd9c"><tt>dec7d95</tt></a>) last updated 2015/06/25 13:21:33 (GMT -500)<br>
v1/ansible/modules/core: (detached HEAD <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/ansible/ansible/commit/f8d8af17cdc72500af8319c96004b86ac702a0a4/hovercard" href="https://github.com/ansible/ansible/commit/f8d8af17cdc72500af8319c96004b86ac702a0a4"><tt>f8d8af1</tt></a>) last updated 2015/06/03 00:37:54 (GMT -500)<br>
v1/ansible/modules/extras: (detached HEAD <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/ansible/ansible/commit/495ad450e53feb1cd26218dc68056cc34d1ea9ff/hovercard" href="https://github.com/ansible/ansible/commit/495ad450e53feb1cd26218dc68056cc34d1ea9ff"><tt>495ad45</tt></a>) last updated 2015/06/03 00:37:58 (GMT -500)<br>
configured module search path = None</p>
<h5 dir="auto">Ansible Configuration:</h5>
<p dir="auto">$ source hacking/env-setup</p>
<h5 dir="auto">Environment:</h5>
<p dir="auto">OS X Yosemite 10.10.3</p>
<p dir="auto">$ python -V<br>
Python 2.7.6</p>
<p dir="auto">$ pip freeze<br>
ansible==2.0.0<br>
coverage==3.7.1<br>
coveralls==0.5<br>
docopt==0.6.2<br>
ecdsa==0.13<br>
epdb==0.12<br>
httplib2==0.9.1<br>
isodate==0.5.1<br>
Jinja2==2.7.3<br>
kerberos==1.2.2<br>
linecache2==1.0.0<br>
MarkupSafe==0.23<br>
mock==1.0.1<br>
nose==1.3.7<br>
paramiko==1.15.2<br>
passlib==1.6.2<br>
pycrypto==2.6.1<br>
pywinrm==0.0.3<br>
PyYAML==3.11<br>
requests==2.7.0<br>
six==1.9.0<br>
traceback2==1.4.0<br>
unittest2==1.0.1<br>
xmltodict==0.9.2</p>
<h5 dir="auto">Summary:</h5>
<p dir="auto">AttributeError: 'list' object has no attribute 'intersection'</p>
<h5 dir="auto">Steps To Reproduce:</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ source hacking/env-setup
$ cd ../playbooks/
$ ansible-playbook --ask-pass --ask-sudo-pass  -i testing-servers linux-servers.yml --tags &quot;apt&quot;
SSH password:
SUDO password[defaults to SSH password]:
PLAY: ***************************************************************************
Traceback (most recent call last):
  File &quot;/Users/tanner/projects/ansible.git/ansible/bin/ansible-playbook&quot;, line 66, in &lt;module&gt;
    sys.exit(cli.run())
  File &quot;/Users/tanner/projects/ansible.git/ansible/lib/ansible/cli/playbook.py&quot;, line 161, in run
    results = pbex.run()
  File &quot;/Users/tanner/projects/ansible.git/ansible/lib/ansible/executor/playbook_executor.py&quot;, line 127, in run
    result = self._tqm.run(play=play)
  File &quot;/Users/tanner/projects/ansible.git/ansible/lib/ansible/executor/task_queue_manager.py&quot;, line 250, in run
    iterator = PlayIterator(inventory=self._inventory, play=new_play, connection_info=connection_info, all_vars=all_vars)
  File &quot;/Users/tanner/projects/ansible.git/ansible/lib/ansible/executor/play_iterator.py&quot;, line 95, in __init__
    new_block = block.filter_tagged_tasks(connection_info, all_vars)
  File &quot;/Users/tanner/projects/ansible.git/ansible/lib/ansible/playbook/block.py&quot;, line 318, in filter_tagged_tasks
    new_block.block  = evaluate_and_append_task(self.block)
  File &quot;/Users/tanner/projects/ansible.git/ansible/lib/ansible/playbook/block.py&quot;, line 313, in evaluate_and_append_task
    if task.evaluate_tags(connection_info.only_tags, connection_info.skip_tags, all_vars=all_vars):
  File &quot;/Users/tanner/projects/ansible.git/ansible/lib/ansible/playbook/taggable.py&quot;, line 82, in evaluate_tags
    elif tags.intersection(only_tags):
AttributeError: 'list' object has no attribute 'intersection'"><pre class="notranslate"><code class="notranslate">$ source hacking/env-setup
$ cd ../playbooks/
$ ansible-playbook --ask-pass --ask-sudo-pass  -i testing-servers linux-servers.yml --tags "apt"
SSH password:
SUDO password[defaults to SSH password]:
PLAY: ***************************************************************************
Traceback (most recent call last):
  File "/Users/tanner/projects/ansible.git/ansible/bin/ansible-playbook", line 66, in &lt;module&gt;
    sys.exit(cli.run())
  File "/Users/tanner/projects/ansible.git/ansible/lib/ansible/cli/playbook.py", line 161, in run
    results = pbex.run()
  File "/Users/tanner/projects/ansible.git/ansible/lib/ansible/executor/playbook_executor.py", line 127, in run
    result = self._tqm.run(play=play)
  File "/Users/tanner/projects/ansible.git/ansible/lib/ansible/executor/task_queue_manager.py", line 250, in run
    iterator = PlayIterator(inventory=self._inventory, play=new_play, connection_info=connection_info, all_vars=all_vars)
  File "/Users/tanner/projects/ansible.git/ansible/lib/ansible/executor/play_iterator.py", line 95, in __init__
    new_block = block.filter_tagged_tasks(connection_info, all_vars)
  File "/Users/tanner/projects/ansible.git/ansible/lib/ansible/playbook/block.py", line 318, in filter_tagged_tasks
    new_block.block  = evaluate_and_append_task(self.block)
  File "/Users/tanner/projects/ansible.git/ansible/lib/ansible/playbook/block.py", line 313, in evaluate_and_append_task
    if task.evaluate_tags(connection_info.only_tags, connection_info.skip_tags, all_vars=all_vars):
  File "/Users/tanner/projects/ansible.git/ansible/lib/ansible/playbook/taggable.py", line 82, in evaluate_tags
    elif tags.intersection(only_tags):
AttributeError: 'list' object has no attribute 'intersection'
</code></pre></div>
<p dir="auto">Via a git bisect, I have found that a recent traceback when specifying tags on the command line, was introduced in <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/ansible/ansible/commit/0eb1c880ddac9547560040311739b5ca8291a642/hovercard" href="https://github.com/ansible/ansible/commit/0eb1c880ddac9547560040311739b5ca8291a642"><tt>0eb1c88</tt></a> to resolve <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="46210973" data-permission-text="Title is private" data-url="https://github.com/ansible/ansible/issues/9380" data-hovercard-type="issue" data-hovercard-url="/ansible/ansible/issues/9380/hovercard" href="https://github.com/ansible/ansible/issues/9380">#9380</a></p>
<p dir="auto">That commit references:</p>
<blockquote>
<p dir="auto">Use itertools instead of set for tags</p>
</blockquote>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Traceback (most recent call last):
  File &quot;/Users/matt/python_venvs/ansibledev/ansible/bin/ansible-playbook&quot;, line 66, in &lt;module&gt;
    sys.exit(cli.run())
  File &quot;/Users/matt/python_venvs/ansibledev/ansible/lib/ansible/cli/playbook.py&quot;, line 161, in run
    results = pbex.run()
  File &quot;/Users/matt/python_venvs/ansibledev/ansible/lib/ansible/executor/playbook_executor.py&quot;, line 127, in run
    result = self._tqm.run(play=play)
  File &quot;/Users/matt/python_venvs/ansibledev/ansible/lib/ansible/executor/task_queue_manager.py&quot;, line 248, in run
    iterator = PlayIterator(inventory=self._inventory, play=new_play, connection_info=connection_info, all_vars=all_vars)
  File &quot;/Users/matt/python_venvs/ansibledev/ansible/lib/ansible/executor/play_iterator.py&quot;, line 95, in __init__
    new_block = block.filter_tagged_tasks(connection_info, all_vars)
  File &quot;/Users/matt/python_venvs/ansibledev/ansible/lib/ansible/playbook/block.py&quot;, line 318, in filter_tagged_tasks
    new_block.block  = evaluate_and_append_task(self.block)
  File &quot;/Users/matt/python_venvs/ansibledev/ansible/lib/ansible/playbook/block.py&quot;, line 313, in evaluate_and_append_task
    if task.evaluate_tags(connection_info.only_tags, connection_info.skip_tags, all_vars=all_vars):
  File &quot;/Users/matt/python_venvs/ansibledev/ansible/lib/ansible/playbook/taggable.py&quot;, line 82, in evaluate_tags
    elif tags.intersection(only_tags):
AttributeError: 'list' object has no attribute 'intersection'"><pre class="notranslate"><code class="notranslate">Traceback (most recent call last):
  File "/Users/matt/python_venvs/ansibledev/ansible/bin/ansible-playbook", line 66, in &lt;module&gt;
    sys.exit(cli.run())
  File "/Users/matt/python_venvs/ansibledev/ansible/lib/ansible/cli/playbook.py", line 161, in run
    results = pbex.run()
  File "/Users/matt/python_venvs/ansibledev/ansible/lib/ansible/executor/playbook_executor.py", line 127, in run
    result = self._tqm.run(play=play)
  File "/Users/matt/python_venvs/ansibledev/ansible/lib/ansible/executor/task_queue_manager.py", line 248, in run
    iterator = PlayIterator(inventory=self._inventory, play=new_play, connection_info=connection_info, all_vars=all_vars)
  File "/Users/matt/python_venvs/ansibledev/ansible/lib/ansible/executor/play_iterator.py", line 95, in __init__
    new_block = block.filter_tagged_tasks(connection_info, all_vars)
  File "/Users/matt/python_venvs/ansibledev/ansible/lib/ansible/playbook/block.py", line 318, in filter_tagged_tasks
    new_block.block  = evaluate_and_append_task(self.block)
  File "/Users/matt/python_venvs/ansibledev/ansible/lib/ansible/playbook/block.py", line 313, in evaluate_and_append_task
    if task.evaluate_tags(connection_info.only_tags, connection_info.skip_tags, all_vars=all_vars):
  File "/Users/matt/python_venvs/ansibledev/ansible/lib/ansible/playbook/taggable.py", line 82, in evaluate_tags
    elif tags.intersection(only_tags):
AttributeError: 'list' object has no attribute 'intersection'
</code></pre></div>
<p dir="auto">cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/jimi-c/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/jimi-c">@jimi-c</a></p>