Bug 1154313 - [abrt] ansible: play.py:750:_late_merge_role_tags:TypeError: unhashable type: 'list'
Summary: [abrt] ansible: play.py:750:_late_merge_role_tags:TypeError: unhashable type:...
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: ansible
Version: 20
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Kevin Fenzi
QA Contact: Fedora Extras Quality Assurance
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:feea78f266387ce9316b4f26a33...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-10-18 16:50 UTC by Maciej Lasyk
Modified: 2014-10-19 17:25 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-10-19 17:25:24 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: backtrace (951 bytes, text/plain)
2014-10-18 16:50 UTC, Maciej Lasyk
no flags Details
File: environ (4.04 KB, text/plain)
2014-10-18 16:50 UTC, Maciej Lasyk
no flags Details

Description Maciej Lasyk 2014-10-18 16:50:07 UTC
Description of problem:
Tried to run playbook which contained badly defined tags:
   tags:                                                                                                                                                                                                                         
       - [ 'prepare-env', 'lxc_container' ]

Version-Release number of selected component:
ansible-1.7.2-1.fc20

Additional info:
reporter:       libreport-2.2.3
cmdline:        /usr/bin/python /usr/bin/ansible-playbook home-dc.yml --limit net-warez --tags lxc_container --list-tasks
executable:     /usr/bin/ansible-playbook
kernel:         3.16.4-200.fc20.x86_64
runlevel:       N 5
type:           Python
uid:            1000

Truncated backtrace:
play.py:750:_late_merge_role_tags:TypeError: unhashable type: 'list'

Traceback (most recent call last):
  File "/usr/bin/ansible-playbook", line 309, in <module>
    sys.exit(main(sys.argv[1:]))
  File "/usr/bin/ansible-playbook", line 202, in main
    vault_password=pb.vault_password)
  File "/usr/lib/python2.7/site-packages/ansible/playbook/play.py", line 161, in __init__
    self._late_merge_role_tags()
  File "/usr/lib/python2.7/site-packages/ansible/playbook/play.py", line 750, in _late_merge_role_tags
    self._tasks[idx].tags = sorted(set(self._tasks[idx].tags + role_tags[this_role]))
TypeError: unhashable type: 'list'

Local variables in innermost frame:
task: {'meta': 'flush_handlers'}
val: <ansible.playbook.task.Task object at 0x1657140>
idx: 1
self: <ansible.playbook.play.Play object at 0x1646880>
role_tags: {'prepare-env-78a7eae7-d59f-469c-b7f4-2561805e571e': []}
this_role: 'prepare-env-78a7eae7-d59f-469c-b7f4-2561805e571e'

Comment 1 Maciej Lasyk 2014-10-18 16:50:11 UTC
Created attachment 948119 [details]
File: backtrace

Comment 2 Maciej Lasyk 2014-10-18 16:50:13 UTC
Created attachment 948120 [details]
File: environ

Comment 3 Kevin Fenzi 2014-10-19 16:51:12 UTC
Right, should be: 

tags:                                                                                                                                                                                                                         
       - prepare-env
       - lxc_container

I agree it would be nice if the error message was more clear, but thats more a thing for upstream. 

Could you file an upstream issue with that thought? or is there something else we can do here?

Comment 4 Maciej Lasyk 2014-10-19 17:08:45 UTC
Hi Kev,

Yep, it's only about showing stack - trace instead of displaying the error message. And think you're right that this should be rather filed to the upstream. This bug was reported automatically by my Fedora and I didn't take notice of the big picture here.

So feel free to close this one. Cheers!

Comment 5 Maciej Lasyk 2014-10-19 17:14:54 UTC
Reported https://github.com/ansible/ansible/issues/9380

Comment 6 Kevin Fenzi 2014-10-19 17:25:24 UTC
Thanks!


Note You need to log in before you can comment on or make changes to this bug.