Bug 924889

Summary: [abrt] ansible-1.1-0.git201303011750.fc18: __init__.py:192:path_dwim:AttributeError: 'dict' object has no attribute 'startswith'
Product: [Fedora] Fedora Reporter: Peter Janes <bugzilla.redhat.com>
Component: ansibleAssignee: Tim Bielawa <tbielawa>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: kevin, maxim, tbielawa
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:c2bcb77dcf6ba12fbbf060b188c666f2349a5407
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-03-22 18:48:47 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
File: backtrace
none
File: core_backtrace
none
File: environ
none
File: smolt_data none

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.