ansible-for-devops icon indicating copy to clipboard operation
ansible-for-devops copied to clipboard

Suboptimal command - Chapter 2 - Your first Ansible playbook

Open gunchev opened this issue 1 year ago • 0 comments

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 :-)

gunchev avatar Jul 12 '23 05:07 gunchev