Skip to content

Commit

Permalink
chore: allow systemctl --version to be used (#2327)
Browse files Browse the repository at this point in the history
If a user wants to get the version of systemd, allow this without
raising a `command-instead-of-module` error.

The `ansible.builtin.systemd` module does not have support for getting
the version.
  • Loading branch information
JohnVillalovos committed Aug 23, 2022
1 parent 455798a commit a39f8cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ansiblelint/rules/command_instead_of_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class CommandsInsteadOfModulesRule(AnsibleLintRule):

_executable_options = {
"git": ["branch", "log", "lfs"],
"systemctl": ["set-default", "show-environment", "status"],
"systemctl": ["--version", "set-default", "show-environment", "status"],
"yum": ["clean"],
"rpm": ["--nodeps"],
}
Expand Down

0 comments on commit a39f8cb

Please sign in to comment.