# Ansible-lint --fix and comparison operators

**URL:** <https://forum.ansible.com/t/ansible-lint-fix-and-comparison-operators/8529>\
**Category:** Get Help\
**Tags:** windows, ansible-lint\
**Created:** [September 16, 2024, 9:14am UTC](https://forum.ansible.com/t/ansible-lint-fix-and-comparison-operators/8529 "2024-09-16T09:14:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![falon](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/falon/32/2081_2.png) [@falon](https://forum.ansible.com/u/falon)\
**Post date:** [September 16, 2024, 9:14am UTC](https://forum.ansible.com/t/ansible-lint-fix-and-comparison-operators/8529/1 "2024-09-16T09:14:30Z")

</div>

Hello,

just an annoying note… I see that `ansible-lint --fix` provides this change:

```auto
   when:
- - ansible_os_family == 'RedHat' or
- ansible_os_family == 'Debian' or
- ansible_os_family == 'Windows'
+ - ansible_os_family == 'RedHat' or ansible_os_family == 'Debian' or ansible_os_family == 'Windows'

```

Not very important, I just leave this as an hint. If I have a long expression, it could be better to leave the line break after each comparison operator. It’s more readable for me.

Thank you and thank you very much for maintain ansible-lint!  
Marco

---

<div class="post-metadata">

**Author:** ![bcoca](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/bcoca/32/9269_2.png) [@bcoca](https://forum.ansible.com/u/bcoca)\
**Post date:** [September 16, 2024, 6:09pm UTC](https://forum.ansible.com/t/ansible-lint-fix-and-comparison-operators/8529/2 "2024-09-16T18:09:01Z")

</div>

I would go for something like this:

```auto
when: ansible_os_family in ('RedHat', 'Debian' , 'Windows')

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [October 16, 2024, 6:09pm UTC](https://forum.ansible.com/t/ansible-lint-fix-and-comparison-operators/8529/3 "2024-10-16T18:09:07Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
