Skip to content

Chapter 3: check log files - fix tail command #597

Open
@mvopalka

Description

@mvopalka

In chapter 3 at the section Check log files the command for printing how many Ansible commands have been executed on each server uses tail instead of cat.

I think the line should be
ansible multi -b -m shell -a "cat /var/log/messages | \ grep ansible-command | wc -l"
instead of
ansible multi -b -m shell -a "tail /var/log/messages | \ grep ansible-command | wc -l"
as description says

This command shows how many ansible commands have been run on each server
(the numbers you get may be different).

and the tail command as I now only print the last 5 lines by default.

The line could also be different according to issue #550

Thank you for awesome book Jeff!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions