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

Suboptimal command - Chapter 2 - Your first Ansible playbook #553

Open
gunchev opened this issue Jul 12, 2023 · 0 comments
Open

Suboptimal command - Chapter 2 - Your first Ansible playbook #553

gunchev opened this issue Jul 12, 2023 · 0 comments
Labels

Comments

@gunchev
Copy link

gunchev commented Jul 12, 2023

The example here is:

if ! rpm -qa | grep -qw chrony; then

which can be written simply as:

if ! rpm -q chrony --quiet; then

or

if ! rpm -q --quiet chrony; then

Which in turn will use index in the RPM's sqlite DB (or previously BDB).

Reporting as directed on Twitter :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants