Thank you all for your response

On Thursday, December 22, 2022 at 6:30:52 PM UTC+5:30 [email protected] 
wrote:

> There's a little more info on why this behaviour occurs here: 
> https://github.com/ansible/ansible-lint/issues/1398
>
> The shell return value is accurate regardless:
>
> [wmcdonald@fedora tests]$ ll
> total 4
> -rw-r--r--. 1 wmcdonald wmcdonald 143 Dec 22 12:55 test1.yaml
> [wmcdonald@fedora tests]$ cat test1.yaml 
> ---
>
> - hosts: localhost
>   gather_facts: yes
>
>   tasks:
>   - name: printing some debuggery
>     debug:
>       msg: "O HAI!"
>
> # vim:sw=2:ts=2:et:ai
>
> [wmcdonald@fedora tests]$ ansible-lint
> [wmcdonald@fedora tests]$ echo $?
> 0
> [wmcdonald@fedora tests]$ ansible-lint test1.yaml 
> WARNING  Overriding detected file kind 'yaml' with 'playbook' for given 
> positional argument: test1.yaml
> [wmcdonald@fedora tests]$ echo $?
> 0
>
> On Thu, 22 Dec 2022 at 12:40, Todd Lewis <[email protected]> wrote:
>
>> Not possible to omit generating those messages, although you could say
>>
>> $ ansible-lint […] 2>/dev/null
>>
>> If the positional argument were, say, a group_vars file and it was being 
>> linted as if it were a playbook, then "WARNING …" would clearly make sense. 
>> Or if you didn't intend "my_test.yml" to be linted as a playbook, then 
>> you'd be glad for the warning.
>>
>> As it is, since you can't pick which lintable schema to use on a given 
>> file (at least not from --help's output, or the missing man page), I'll 
>> stand by my original statement: it's an informational message that happens 
>> to begin with the text "WARNING". That's just my opinion, but ansible-lint 
>> is extremely opinionated after all.
>>
>> On Thursday, December 22, 2022 at 7:16:08 AM UTC-5 rajthecomputerguy 
>> wrote:
>>
>>> It is a warning , can you please tell me how to avoid this?
>>>
>>> *WARNING  Overriding detected file kind 'yaml' with 'playbook' for given 
>>> positional argument: my_test.yml*
>>>
>>> On Thursday, December 22, 2022 at 5:22:50 PM UTC+5:30 [email protected] 
>>> wrote:
>>>
>>>> That isn't an error. It's just information: the yaml file is being 
>>>> treated as a playbook.
>>>>
>>>> On Thursday, December 22, 2022 at 5:40:02 AM UTC-5 rajthecomputerguy 
>>>> wrote:
>>>>
>>>>> Hi Team,
>>>>>
>>>>> I am facing below error while doing ansible-lint, Any help would be 
>>>>> appreciated 
>>>>>
>>>>> command: *ansible-lint test.yaml*
>>>>>
>>>>> *Overriding detected file kind 'yaml' with 'playbook' for given 
>>>>> positional argument*
>>>>>
>>>>> Thanks,
>>>>> Raj
>>>>>
>>>> -- 
>> 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/1cbbe42b-5756-4f11-8337-ef8d315a8250n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/ansible-project/1cbbe42b-5756-4f11-8337-ef8d315a8250n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
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/d4fadde4-3fa5-4fbc-a00e-518901c99f57n%40googlegroups.com.

Reply via email to