Ansible

Ansible

Made by DeepSource

Use command instead of shell ANS-E3005

Anti-pattern
Major

Use shell only when shell functionality is required.

Shell should only be used when piping, redirecting or chaining commands (and Ansible would be preferred for some of those!)

Bad practice

- name: command should be used here
  shell: echo hello

Recommended

- name: chain two shell commands
  shell: echo hello && echo goodbye