Krikri::Lint::CommandInsteadOfModuleRule
Inherits Krikri::Lint::Rule < Reference < Object
Upstream parity: ansible-lint's command-instead-of-module (severity HIGH, tags command-shell/idiom). Flags command:/shell: tasks whose first command word is an executable an Ansible module covers, with upstream's second-argument exemptions.
Constants
COMMAND_MODULES = ["command", "shell"] of ::String
EXECUTABLE_OPTIONS = {"git" => ["branch", "log", "lfs", "rev-parse", "clean"] of ::String, "systemctl" => ["--version", "get-default", "kill", "set-default", "set-property", "set-environment", "unset-environment", "show-environment", "status", "reset-failed"] of ::String, "yum" => ["clean", "history", "info"] of ::String, "rpm" => ["--nodeps"] of ::String}
MODULES = {"apt-get" => "apt-get", "chkconfig" => "service", "curl" => "get_url or uri", "git" => "git", "hg" => "hg", "letsencrypt" => "acme_certificate", "mktemp" => "tempfile", "mount" => "mount", "patch" => "patch", "rpm" => "yum or rpm_key", "rsync" => "synchronize", "sed" => "template, replace or lineinfile", "service" => "service", "supervisorctl" => "supervisorctl", "svn" => "subversion", "systemctl" => "systemd", "tar" => "unarchive", "unzip" => "unarchive", "wget" => "get_url or uri", "yum" => "yum"}
Instance methods
applies_to
Sourceid
Sourceseverity
Sourcetags
Sourcetask_scoped?
Task-oriented: violations belong to an enclosing task, so a
# noqa: anywhere in that task's body suppresses them.