geerlingguy / geerlingguy/ansible-for-devops

Chapter 3: check log files - fix tail command

Open Beginner friendly
#597 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
9.9k
Forks
3.8k
PR merge metrics
No merged PRs in 30d

Description

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](https://github.com/geerlingguy/ansible-for-devops-manuscript/blob/4f14b52476e60c31c331e0a681db394281e4cde7/chapter3.txt#L640) 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!

Contributor guide

No contributing guide indexed for this repository

Research direction

Open chapter3.txt around line 640 and compare the command with the surrounding explanation and issue #550. Update the log-counting example so it matches the stated behavior, then verify the rendered Chapter 3 text shows the corrected command.

Written by the indexing model from the issue text.

Assessment

Tech stack
ansible
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.