Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow rpm --nodeps command-instead-of-module #1786

Merged
merged 4 commits into from
Jan 10, 2022
Merged

Conversation

bluikko
Copy link
Contributor

@bluikko bluikko commented Dec 17, 2021

Running command rpm -e [...] causes a failure due to rule command-instead-of-module. But the yum module does not support "expunge" action, so the suggestion to use it is invalid.

Edit command-instead-of-module rule to add rpm -e to commands that skip the suggestion to use yum module instead of command.

@bluikko bluikko requested a review from a team as a code owner December 17, 2021 05:30
@bluikko bluikko requested review from relrod, ganeshrn and cidrblock and removed request for a team December 17, 2021 05:30
@bluikko
Copy link
Contributor Author

bluikko commented Dec 17, 2021

Quite the brain fart here...

It was of course not the rpm -e command that cannot be done with the yum module (it can), the problem is -e --nodeps.

The --nodeps functionality does not exist in the yum module. But also ansible-lint cannot be simply patched like this to make it take both -e and --nodeps into account (?). So instead ignore the rpm command if it includes --nodeps.

It would be better if the rule would take into account both -e and --nodeps together I guess.

@bluikko bluikko changed the title Allow rpm expunge command-instead-of-module Allow rpm nodeps command-instead-of-module Dec 17, 2021
@webknjaz webknjaz requested review from ssbarnea and a team December 22, 2021 13:43
@ssbarnea ssbarnea changed the title Allow rpm nodeps command-instead-of-module Allow rpm --nodeps command-instead-of-module Dec 30, 2021
@ssbarnea ssbarnea added the bug label Dec 30, 2021
@ssbarnea ssbarnea enabled auto-merge (squash) January 10, 2022 12:19
@ssbarnea ssbarnea merged commit f41f1f9 into ansible:main Jan 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants