Skip to content

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

@gunchev

Description

@gunchev

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions