Description of problem: I ran ansible-lint on a playbook. Version-Release number of selected component: ansible-lint-2.0.3-1.fc22 Additional info: reporter: libreport-2.6.4 cmdline: /usr/bin/python2 /usr/bin/ansible-lint playbook.yml environ: executable: /usr/bin/ansible-lint kernel: 4.4.6-201.fc22.x86_64 runlevel: N 5 type: Python uid: 1000 Truncated backtrace: utils.py:81:find_children:AttributeError: 'module' object has no attribute 'parse_yaml_from_file' Traceback (most recent call last): File "/usr/bin/ansible-lint", line 104, in <module> sys.exit(main(sys.argv[1:])) File "/usr/bin/ansible-lint", line 91, in main matches = runner.run() File "/usr/lib/python2.7/site-packages/ansiblelint/__init__.py", line 171, in run for file in utils.find_children(arg): File "/usr/lib/python2.7/site-packages/ansiblelint/utils.py", line 81, in find_children pb_data = ansible.utils.parse_yaml_from_file(playbook[0]) AttributeError: 'module' object has no attribute 'parse_yaml_from_file' Local variables in innermost frame: basedir: '' results: [] playbook: ('playbook.yml', 'playbook')
Created attachment 1158461 [details] File: backtrace
I ran ansible-lint on couple of playbook files and they worked fine. I think to reproduce this bug, I will need that exact playbook file. Or we have latest ansible-lint-2.6.2 built for F23+ releases. I have done a scratch build for f22. You can check your playbook against this new ansible-lint release -> http://koji.fedoraproject.org/koji/taskinfo?taskID=14142583
Thank you for the fast reply. The bug also happens with playbooks from Fedora infra, for example: ansible-lint playbooks/rdiff-backup.yml Traceback (most recent call last): File "/usr/bin/ansible-lint", line 104, in <module> sys.exit(main(sys.argv[1:])) File "/usr/bin/ansible-lint", line 91, in main matches = runner.run() File "/usr/lib/python2.7/site-packages/ansiblelint/__init__.py", line 171, in run for file in utils.find_children(arg): File "/usr/lib/python2.7/site-packages/ansiblelint/utils.py", line 81, in find_children pb_data = ansible.utils.parse_yaml_from_file(playbook[0]) AttributeError: 'module' object has no attribute 'parse_yaml_from_file' And there is no parse_yaml_from_file in ansible.utils from ansible-2.0.2.0-1.fc22 It works with ansible-lint-2.6.2-1.fc22.noarch from the scratch build.
I'm seeing with on EPEL7 which has a woefully out of date ansible-lint as well: ansible-lint-2.0.1-1.el7.noarch
Fails to build on el7 with: Executing(%check): /bin/sh -e /tmp/rpm/rpm-tmp.vHovss + umask 022 + cd /export/home/orion/fedora/ansible-lint + cd ansible-lint-2.6.2 + /usr/bin/python2 setup.py test /usr/lib64/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'include_package_date' warnings.warn(msg) running test running egg_info writing requirements to lib/ansible_lint.egg-info/requires.txt writing lib/ansible_lint.egg-info/PKG-INFO writing top-level names to lib/ansible_lint.egg-info/top_level.txt writing dependency_links to lib/ansible_lint.egg-info/dependency_links.txt reading manifest file 'lib/ansible_lint.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file 'lib/ansible_lint.egg-info/SOURCES.txt' running build_ext Traceback (most recent call last): File "setup.py", line 26, in <module> test_suite="test" File "/usr/lib64/python2.7/distutils/core.py", line 152, in setup dist.run_commands() File "/usr/lib64/python2.7/distutils/dist.py", line 953, in run_commands self.run_command(cmd) File "/usr/lib64/python2.7/distutils/dist.py", line 972, in run_command cmd_obj.run() File "/usr/lib/python2.7/site-packages/setuptools/command/test.py", line 138, in run self.with_project_on_sys_path(self.run_tests) File "/usr/lib/python2.7/site-packages/setuptools/command/test.py", line 118, in with_project_on_sys_path func() File "/usr/lib/python2.7/site-packages/setuptools/command/test.py", line 164, in run_tests testLoader = cks File "/usr/lib64/python2.7/unittest/main.py", line 94, in __init__ self.parseArgs(argv) File "/usr/lib64/python2.7/unittest/main.py", line 149, in parseArgs self.createTests() File "/usr/lib64/python2.7/unittest/main.py", line 158, in createTests self.module) File "/usr/lib64/python2.7/unittest/loader.py", line 128, in loadTestsFromNames suites = [self.loadTestsFromName(name, module) for name in names] File "/usr/lib64/python2.7/unittest/loader.py", line 103, in loadTestsFromName return self.loadTestsFromModule(obj) File "/usr/lib/python2.7/site-packages/setuptools/command/test.py", line 35, in loadTestsFromModule tests.append(self.loadTestsFromName(submodule)) File "/usr/lib64/python2.7/unittest/loader.py", line 100, in loadTestsFromName parent, obj = obj, getattr(obj, part) AttributeError: 'module' object has no attribute 'test_support' But I think this is because there aren't actually any tests to run.
Thanks Till and Orion. I will backport the 2.6.2 release to F22 and epel7.
ansible-lint-2.6.2-1.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2016-6919765188
ansible-lint-2.6.2-1.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-3e196c6cc5
ansible-lint-2.6.2-1.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-6919765188
ansible-lint-2.6.2-1.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-3e196c6cc5
ansible-lint-2.6.2-1.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.
ansible-lint-2.6.2-1.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.