7

I've finally started using Ansible Lint to ensure I'm up to date and not missing things and I've found it reporting a curious error/notice. When I use dnf to install a package, I've been using state: latest as it's for a system bootstrapping process that I may run multiple times on the same instance, particularly during development. I always want the latest package installed in this scenario however Ansible Lint is reporting:

Package installs should not use latest

While I'm confident that in my use case I'm ok, is this simply because in the interest of "idempotency" one would normally not want this behaviour? Or is there another reason? If they're always going to report this, then why even offer the latest status option?

oucil
  • 4,211
  • 2
  • 37
  • 53

1 Answers1

16

ansible-lint is opinionated. You may not always agree with those opinions. There are other people who feel that this error from the package module should be removed.

In any case, you can configure the linter to ignore this particular issue. Create a .ansible-lint file in your playbook directory that contains:

skip_list:
  - '403'
larsks
  • 277,717
  • 41
  • 399
  • 399
  • Appreciate the insight into the background, but even more so, how to hide specific notices by ID, great help! – oucil May 11 '20 at 17:04
  • 1
    I'm happy to have the opinions but they really need their rationale explained so I can make an informed decision to agree or disagree in my case. Your issue link thread helped, thanks. – Mike Lippert Jan 02 '21 at 23:02