Bug 924889 - [abrt] ansible-1.1-0.git201303011750.fc18: __init__.py:192:path_dwim:AttributeError: 'dict' object has no attribute 'startswith'
Summary: [abrt] ansible-1.1-0.git201303011750.fc18: __init__.py:192:path_dwim:Attribut...
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: ansible
Version: 18
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tim Bielawa
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:c2bcb77dcf6ba12fbbf060b188c...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-03-22 18:33 UTC by Peter Janes
Modified: 2014-01-21 23:24 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-03-22 18:48:47 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: backtrace (982 bytes, text/plain)
2013-03-22 18:33 UTC, Peter Janes
no flags Details
File: core_backtrace (643 bytes, text/plain)
2013-03-22 18:33 UTC, Peter Janes
no flags Details
File: environ (3.54 KB, text/plain)
2013-03-22 18:33 UTC, Peter Janes
no flags Details
File: smolt_data (2.85 KB, text/plain)
2013-03-22 18:33 UTC, Peter Janes
no flags Details

Description Peter Janes 2013-03-22 18:33:44 UTC
Description of problem:
Added a "tags" entry to a playbook where it wasn't expected, e.g.

- hosts:
  - myhosts
  tags: foo
  tasks:
  - name: do something
    debug: msg="foo"

Version-Release number of selected component:
ansible-1.1-0.git201303011750.fc18

Additional info:
cmdline:        /usr/bin/python /usr/bin/ansible-playbook -u root -i src/main/ansible/ansible_hosts_ci -vvvv src/main/ansible/deploy-ciserver.yml -t foo
executable:     /usr/bin/ansible-playbook
kernel:         3.8.3-203.fc18.x86_64
uid:            1000

Truncated backtrace:
__init__.py:192:path_dwim:AttributeError: 'dict' object has no attribute 'startswith'

Traceback (most recent call last):
  File "/usr/bin/ansible-playbook", line 205, in <module>
    sys.exit(main(sys.argv[1:]))
  File "/usr/bin/ansible-playbook", line 176, in main
    pb.run()
  File "/usr/lib/python2.7/site-packages/ansible/playbook/__init__.py", line 202, in run
    play = Play(self, play_ds, play_basedir)
  File "/usr/lib/python2.7/site-packages/ansible/playbook/play.py", line 81, in __init__
    self._update_vars_files_for_host(None)
  File "/usr/lib/python2.7/site-packages/ansible/playbook/play.py", line 316, in _update_vars_files_for_host
    filename4 = utils.path_dwim(self.basedir, filename3)
  File "/usr/lib/python2.7/site-packages/ansible/utils/__init__.py", line 192, in path_dwim
    if given.startswith("/"):
AttributeError: 'dict' object has no attribute 'startswith'

Local variables in innermost frame:
given: {'tags': 'foo'}
basedir: 'src/main/ansible'

Comment 1 Peter Janes 2013-03-22 18:33:46 UTC
Created attachment 714712 [details]
File: backtrace

Comment 2 Peter Janes 2013-03-22 18:33:50 UTC
Created attachment 714713 [details]
File: core_backtrace

Comment 3 Peter Janes 2013-03-22 18:33:51 UTC
Created attachment 714714 [details]
File: environ

Comment 4 Peter Janes 2013-03-22 18:33:53 UTC
Created attachment 714715 [details]
File: smolt_data

Comment 5 Tim Bielawa 2013-03-22 18:48:47 UTC
Hi,

From the look of your version I'd say you're running off upstream git, which is ahead of what we have packaged in the repositories:

ansible-1.1-0.git201303011750.fc18

I'm going to close this bug since it's not an issue on our side of things. Can you resubmit this on the upstream issue tracker?

https://github.com/ansible/ansible/issues/new

Thanks!

Comment 6 Peter Janes 2013-03-22 20:47:43 UTC
Will do, thanks.  I hadn't looked closely enough to realize it wasn't a crash in the Python interpreter.


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