Skip to content

ansible-lint cleanup - part 1#6928

Merged
millerdev merged 7 commits into
masterfrom
dm/ansible-lint-safe-cleanup
Jul 1, 2026
Merged

ansible-lint cleanup - part 1#6928
millerdev merged 7 commits into
masterfrom
dm/ansible-lint-safe-cleanup

Conversation

@millerdev

Copy link
Copy Markdown
Contributor

Part of the ongoing effort to upgrade Ansible and reduce the .ansible-lint-ignore backlog. This PR clears the low-risk, mechanical lint rules. Later PRs will handle similar riskier work.

https://dimagi.atlassian.net/browse/SAAS-19980

🐡 Review by commit.

Environments Affected

None.

{{x}} → {{ x }}, purely cosmetic
Replace 'when: x == True/False' with idiomatic 'when: x' / 'when: not x'
Replace `item.stdout != ""` with bare `item.stdout` truthiness
Names are diagnostic only; no behavior change.
Fixing these would require adding boilerplate to each role at
src/commcare_cloud/ansible/roles/<role>/meta/main.yml:

```yml
galaxy_info:
  description: ...
  author: Dimagi
  license: BSD-3-Clause
  min_ansible_version: "2.10"
  platforms:
    - name: Ubuntu
```

The benefit is not clear; looks like just more lines to maintain.
Roles can be updated if they are ever published to Ansible Galaxy.
@millerdev millerdev requested review from AmitPhulera and gherceg June 30, 2026 20:44

@gherceg gherceg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

@AmitPhulera AmitPhulera left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Started looking good already.

Curious if you have done these manually or there is a formatter that fixes the auto-fixable problems?

@millerdev

Copy link
Copy Markdown
Contributor Author

Curious if you have done these manually or there is a formatter that fixes the auto-fixable problems?

There is no auto-fixer that I know of. I used Claude + manual edits. 🙂

@millerdev millerdev merged commit 9fe6e0f into master Jul 1, 2026
9 checks passed
@millerdev millerdev deleted the dm/ansible-lint-safe-cleanup branch July 1, 2026 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants