Skip to content

Commit a39f8cb

Browse files
chore: allow systemctl --version to be used (#2327)
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.
1 parent 455798a commit a39f8cb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ansiblelint/rules/command_instead_of_module.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class CommandsInsteadOfModulesRule(AnsibleLintRule):
7070

7171
_executable_options = {
7272
"git": ["branch", "log", "lfs"],
73-
"systemctl": ["set-default", "show-environment", "status"],
73+
"systemctl": ["--version", "set-default", "show-environment", "status"],
7474
"yum": ["clean"],
7575
"rpm": ["--nodeps"],
7676
}

0 commit comments

Comments
 (0)