Bug 1139886 - [abrt] ansible: ConfigParser.py:512:_read:MissingSectionHeaderError: File contains no section headers.
Summary: [abrt] ansible: ConfigParser.py:512:_read:MissingSectionHeaderError: File con...
Keywords:
Status: CLOSED NOTABUG
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:2071a70dffc7ff50cbde918ac57...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-09-09 22:12 UTC by joel
Modified: 2015-03-05 16:00 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-05 16:00:06 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: backtrace (1.29 KB, text/plain)
2014-09-09 22:12 UTC, joel
no flags Details
File: environ (3.16 KB, text/plain)
2014-09-09 22:12 UTC, joel
no flags Details

Description joel 2014-09-09 22:12:11 UTC
Version-Release number of selected component:
ansible-1.7-1.fc20

Additional info:
reporter:       libreport-2.2.3
cmdline:        /usr/bin/python /usr/bin/ansible --help
dso_list:       python-libs-2.7.5-13.fc20.x86_64
executable:     /usr/bin/ansible
kernel:         3.15.10-201.fc20.x86_64
runlevel:       N 5
type:           Python
uid:            1000

Truncated backtrace:
ConfigParser.py:512:_read:MissingSectionHeaderError: File contains no section headers.
file: /home/joel/github/wizard-scripts/ansible.cfg, line: 1
'hostfile = ./hosts\n'

Traceback (most recent call last):
  File "/usr/bin/ansible", line 25, in <module>
    from ansible.runner import Runner
  File "/usr/lib/python2.7/site-packages/ansible/runner/__init__.py", line 36, in <module>
    import ansible.constants as C
  File "/usr/lib/python2.7/site-packages/ansible/constants.py", line 85, in <module>
    p = load_config_file()
  File "/usr/lib/python2.7/site-packages/ansible/constants.py", line 74, in load_config_file
    p.read(path)
  File "/usr/lib64/python2.7/ConfigParser.py", line 305, in read
    self._read(fp, filename)
  File "/usr/lib64/python2.7/ConfigParser.py", line 512, in _read
    raise MissingSectionHeaderError(fpname, lineno, line)
MissingSectionHeaderError: File contains no section headers.
file: /home/joel/github/wizard-scripts/ansible.cfg, line: 1
'hostfile = ./hosts\n'

Local variables in innermost frame:
cursect: None
fp: <open file '/home/joel/github/wizard-scripts/ansible.cfg', mode 'r' at 0x21f7780>
e: None
fpname: '/home/joel/github/wizard-scripts/ansible.cfg'
mo: None
optname: None
lineno: 1
line: 'hostfile = ./hosts\n'
self: <ConfigParser.ConfigParser instance at 0x2231638>

Comment 1 joel 2014-09-09 22:12:12 UTC
Created attachment 935925 [details]
File: backtrace

Comment 2 joel 2014-09-09 22:12:13 UTC
Created attachment 935926 [details]
File: environ

Comment 3 Kevin Fenzi 2014-09-10 00:00:40 UTC
Your ansible.cfg file seems to be missing the:

[defaults] 

header. 

Add that to the top and things should work. Not sure there is much more that can be done here.


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