Addendum, OP, I just gave an example for you to run ansible-lint, you need 
to run on the yaml files


On Thursday, 9 July 2020 10:08:07 UTC+10, ameya agashe wrote:
>
> You need something like this
>
> [ansible@ip-172-31-40-59 playbooks]$ ansible-lint 
> roles/patching/tasks/*.yml
> [201] Trailing whitespace
> roles/patching/tasks/debian.yml:1
> ---
>
> [201] Trailing whitespace
> roles/patching/tasks/debian.yml:1
> ---
>
> In a nutshell ansible-lint works on YAML files.If you don't give anything 
> it will work on all files, perhaps that's the reason for the error you got.
>
> Ameya
>
>
>
> On Thursday, 9 July 2020 03:42:09 UTC+10, Dick Visser wrote:
>>
>> Not really, with almost zero information that is provided 
>>
>> On Wed, 8 Jul 2020 at 15:10, Jenisha T <[email protected]> wrote: 
>> > 
>> > Hi Team 
>> > 
>> > I get below error when I run ansible-lint. Any clue why it's throwing 
>> error 
>> > 
>> > 0.55s$ ansible-lint . 
>> > 231Traceback (most recent call last): 
>> > 232 File "/home/travis/virtualenv/python2.7.15/bin/ansible-lint", line 
>> 11, in <module> 
>> > 233 sys.exit(main()) 
>> > 234 File 
>> "/home/travis/virtualenv/python2.7.15/lib/python2.7/site-packages/ansiblelint/__main__.py",
>>  
>> line 187, in main 
>> > 235 matches.extend(runner.run()) 
>> > 236 File 
>> "/home/travis/virtualenv/python2.7.15/lib/python2.7/site-packages/ansiblelint/__init__.py",
>>  
>> line 287, in run 
>> > 237 skip_list=self.skip_list)) 
>> > 238 File 
>> "/home/travis/virtualenv/python2.7.15/lib/python2.7/site-packages/ansiblelint/__init__.py",
>>  
>> line 177, in run 
>> > 239 matches.extend(rule.matchtasks(playbookfile, text)) 
>> > 240 File 
>> "/home/travis/virtualenv/python2.7.15/lib/python2.7/site-packages/ansiblelint/__init__.py",
>>  
>> line 87, in matchtasks 
>> > 241 yaml = ansiblelint.utils.append_skipped_rules(yaml, text, 
>> file['type']) 
>> > 242 File 
>> "/home/travis/virtualenv/python2.7.15/lib/python2.7/site-packages/ansiblelint/utils.py",
>>  
>> line 596, in append_skipped_rules 
>> > 243 yaml_skip = _append_skipped_rules(pyyaml_data, file_text, 
>> file_type) 
>> > 244 File 
>> "/home/travis/virtualenv/python2.7.15/lib/python2.7/site-packages/ansiblelint/utils.py",
>>  
>> line 635, in _append_skipped_rules 
>> > 245 if pyyaml_task.get('name') != ruamel_task.get('name'): 
>> > 246AttributeError: 'str' object has no attribute 'get' 
>> > 247The command "ansible-lint ." exited with 1. 
>> > 
>> > 
>> > 
>> > -- 
>> > You received this message because you are subscribed to the Google 
>> Groups "Ansible Project" group. 
>> > To unsubscribe from this group and stop receiving emails from it, send 
>> an email to [email protected]. 
>> > To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/ansible-project/d9796b6f-f831-405e-b314-9d9a75aab0f0n%40googlegroups.com.
>>  
>>
>>
>>
>>
>> -- 
>> Dick Visser 
>> Trust & Identity Service Operations Manager 
>> GÉANT 
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/023b2793-824c-4710-81de-30470b651696o%40googlegroups.com.

Reply via email to