diff --git a/examples/playbooks/rule-command-instead-of-module-pass.yml b/examples/playbooks/rule-command-instead-of-module-pass.yml index fec33c20c9..a3af5d3b15 100644 --- a/examples/playbooks/rule-command-instead-of-module-pass.yml +++ b/examples/playbooks/rule-command-instead-of-module-pass.yml @@ -14,6 +14,10 @@ ansible.builtin.command: git lfs install changed_when: false + - name: Clean git repo (dry run) + ansible.builtin.command: git clean -n -d + changed_when: false + - name: Show systemctl service status ansible.builtin.command: systemctl status systemd-timesyncd changed_when: false diff --git a/src/ansiblelint/rules/command_instead_of_module.py b/src/ansiblelint/rules/command_instead_of_module.py index 9d17827fb2..af6cda3c05 100644 --- a/src/ansiblelint/rules/command_instead_of_module.py +++ b/src/ansiblelint/rules/command_instead_of_module.py @@ -69,7 +69,7 @@ class CommandsInsteadOfModulesRule(AnsibleLintRule): } _executable_options = { - "git": ["branch", "log", "lfs", "rev-parse"], + "git": ["branch", "log", "lfs", "rev-parse", "clean"], "systemctl": [ "--version", "get-default",