Skip to content

fix(ansible): simplify git-lfs installation#6834

Merged
xmfcx merged 1 commit into
mainfrom
fix/ansible/dont-check-lfs
Feb 21, 2026
Merged

fix(ansible): simplify git-lfs installation#6834
xmfcx merged 1 commit into
mainfrom
fix/ansible/dont-check-lfs

Conversation

@xmfcx
Copy link
Copy Markdown
Contributor

@xmfcx xmfcx commented Feb 20, 2026

Description

Fix Git LFS setup by replacing the community.general.git_config check with a direct git lfs install call. The git_config module now requires a name argument even with list_all: true, which made it fail the pre-commit ansible lint check.

Since git lfs install is idempotent (safely rewrites the same config and hooks every run), the conditional check was unnecessary complexity. Also changed state: latest to state: present to avoid unintended upgrades on every run.

The error was this (running pre-commit run -a --config .pre-commit-config-ansible.yaml):

Read https://ansible.readthedocs.io/projects/lint/rules/yaml/ for more details regarding why we have these requirements. Fix mode will not be available.
WARNING  Listing 1 violation(s) that are fatal
args[module]: missing required arguments: name
ansible/roles/dev_tools/tasks/main.yaml:10 Task/Handler: Check if git lfs is installed

Read documentation for instructions on how to ignore specific rule violations.

# Rule Violation Summary

  1 args profile:production tags:syntax,experimental

Failed: 1 failure(s), 0 warning(s) on 275 files. Last profile that met the validation criteria was 'production'. Rating: 5/5 star

How was this PR tested?

Ran the playbook on a fresh machine and on a machine with Git LFS already configured. Verified git lfs env shows correct config in both cases. Confirmed ansible-lint passes cleanly.

pre-commit run -a --config .pre-commit-config-ansible.yaml

https://github.com/autowarefoundation/autoware/actions/runs/22242355408/job/64348702771?pr=6834#step:5:96

Signed-off-by: Mete Fatih Cırıt <mfc@autoware.org>
@github-actions
Copy link
Copy Markdown

Thank you for contributing to the Autoware project!

🚧 If your pull request is in progress, switch it to draft mode.

Please ensure:

@xmfcx xmfcx self-assigned this Feb 20, 2026
@xmfcx xmfcx added the run:health-check Run health-check label Feb 20, 2026
@xmfcx xmfcx merged commit 20cef45 into main Feb 21, 2026
20 of 22 checks passed
@xmfcx xmfcx deleted the fix/ansible/dont-check-lfs branch February 21, 2026 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run:health-check Run health-check

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants