Skip to content

Commit

Permalink
accept yum history and info as valid commands (ansible#4025)
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Sjögren <[email protected]>
  • Loading branch information
konstruktoid authored Feb 14, 2024
1 parent 4b91197 commit 7849f27
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions examples/playbooks/rule-command-instead-of-module-pass.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@
- name: Print current git branch
ansible.builtin.command: git branch
changed_when: false

- name: Print git log
ansible.builtin.command: git log
changed_when: false

- name: Install git lfs support
ansible.builtin.command: git lfs install
changed_when: false
Expand Down Expand Up @@ -35,3 +37,11 @@
- name: Clear yum cache
ansible.builtin.command: ""
changed_when: false

- name: Print yum history
ansible.builtin.command: yum history
changed_when: false

- name: Print yum info
ansible.builtin.command: yum info bash
changed_when: false
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 @@ -78,7 +78,7 @@ class CommandsInsteadOfModulesRule(AnsibleLintRule):
"show-environment",
"status",
],
"yum": ["clean"],
"yum": ["clean", "history", "info"],
"rpm": ["--nodeps"],
}

Expand Down

0 comments on commit 7849f27

Please sign in to comment.