ANSIBLE0013仅在需要外壳程序功能时使用外壳程序

Jul*_*oro 4 ansible ansible-lint

在Ansible角色中,我这样做:

- name: update trusted ca
  shell: "{{ in_ca_dict[ansible_os_family]['update']['shell'] }}"
Run Code Online (Sandbox Code Playgroud)

与:

package_name: ca-certificates
  RedHat:
    path:
      6: /usr/local/share/ca-certificates
      7: /etc/pki/ca-trust/source/anchors
    update:
      shell: /bin/update-ca-trust
  Debian:
    path: /usr/local/share/ca-certificates
    update:
      shell: /usr/sbin/update-ca-certificates
      cache: "no"
Run Code Online (Sandbox Code Playgroud)

ansible-lint通过告诉我molecule

[ANSIBLE0013] Use shell only when shell functionality is required
Run Code Online (Sandbox Code Playgroud)

何时需要外壳功能,何时不要求外壳功能?

应该如何选择替代方法,我的代码对我来说似乎很好。