Errata

Ansible: Up and Running

Errata for Ansible: Up and Running, Third Edition

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".

The following errata were submitted by our customers and approved as valid errors by the author or editor.

Color key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted By Date submitted Date corrected
Page Not Applicable
Figure 1-1

In the tasks section, the name ‘Install config file’ has the following statement: “notify: restart nginx” but in the handlers section, the name is “notify nginx”. The name of the handler should probably be changed to match the notify directive.

Note from the Author or Editor:
This was caught before the 3rd edition went to print.

David Goldsmith  Oct 29, 2021  Jul 12, 2022
Page n/a
Chapter 2, Example 2-9. playbooks/webservers-tls.yml

A task to enable the web server configuration, by linking /etc/nginx/sites-enabled/default to /etc/nginx/sites-available/default (or "{{ conf_file }}"), is omitted from playbooks/webservers-tls.yml. If the reader has run webservers.yml and webservers2.yml playbooks from earlier in the chapter then this isn't an issue, but if not, or the Vagrant VM has since been destroyed, the playbook will fail to fully-configure the web server.

Note from the Author or Editor:
This was caught before the 3rd edition went to print.

Simon Ward  Feb 17, 2022  Jul 12, 2022
Page n/a
Chapter 3, Example 3-3. Vagrantfile with three servers (https://learning.oreilly.com/library/view/ansible-up-and/9781098109141/ch03.html#ex3_vagrantfile)

The first line of the Vagrantfile in Example 3-3 is missing underscores ("_") between the words in the variable name. Replace:

VAGRANTFILE API VERSION = "2"

with:

VAGRANTFILE_API_VERSION = "2"

This is correct in the ansiblebook repository at github.com/ansiblebook/ansiblebook/blob/3rd-edition/ch03/Vagrantfile

Note from the Author or Editor:
This was caught before the 3rd edition went to print.

Simon Ward  Feb 17, 2022  Jul 12, 2022
Page n/a
9. Customizing Hosts, Runs, And Handlers Running on a Batch of Hosts at a Time the description under figure Example 9-8

In the preceding play, with 30 CDN hosts, Ansible would run against one host on the first batch run, and on each subsequent batch run it would run against at most 30% of the hosts (for instance, 1, 10, 10, and 9).

=> "1, 9, 9, 9, and 2" is correct, not "1, 10, 10, and 9".

Note from the Author or Editor:
This was fixed before going to print with the 3rd edition.

YUBI LEE  Mar 29, 2022  Jul 12, 2022
Page Chapter 10 - Error handling with Blocks
Example 10-30. Error-agnostic application-upgrade playbook

The example at 10-29 and 10-30 differs but also it says that the objetive is ¨If all we want to do is get upgraded VMs back to the load-balancer cluster, the play will look a bit different". Accordingly to Ansible documentation, this is not true since:

"If an error occurs in the block and the rescue task succeeds, Ansible reverts the failed status of the original task for the run and continues to run the play as if the original task had succeeded."
meaning that the snapshot is reverted and the hosts with a failed upgrade are added back to the load balancer with the previous version of the application.

Note from the Author or Editor:
Thanks Victor, this issue has been fixed in the sample code on Github.com

https://github.com/ansiblebook/ansiblebook/issues/21

Víctor  Oct 27, 2022  Jul 12, 2022
Page 9
3rd line from the bottom up

The line from the book is "You can write your own plug-ins (see Chapter 10) and modules (Chapter 12) in Python."

The issue is that the second chapter number is wrong. The correct chapter number should be Chapter 19 instead of Chapter 12. Because it is talking about writing your own modules, i.e. custom modules, which is the topic of Chapter 19. Chapter 12 only mentions a little about the built-in modules in Windows and has nothing to do with writing your own modules.

Note from the Author or Editor:
We shuffled the chapters and overlooked this reference.

Frank Zhang  Feb 10, 2024  Jan 09, 2026
Page 28
Last paragraph just before Example 1-2

spelling mistake.
Last sentence in paragraph: "... when connecting toother servers...."
should be: "... when connecting to other servers...."

Stephan Goeting  Jul 15, 2021  Jul 12, 2022
Page 84
Example 3-8

Hi,

I am working my way through this book, and with Example 3-8 I could not get the template to copy the nginx.key and nginx.crt files correctly. It would default to /etc/nginx/sslnginx.key and /etc/nginx/sslnginx.crt.

I asked on /r/ansible on Reddit and they suggested I add a slash between the 2 ssl related variables and it worked as shown here:

ssl_certificate {{ tls_dir }}/{{ cert_file }};
ssl_certificate_key {{ tls_dir }}/{{ key_file }};

I am on MacOS Sequoia 15.7.3 with the following config:

ansible [core 2.20.1]
config file = None
configured module search path = ['/Users/michael/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /opt/homebrew/Cellar/ansible/13.1.0/libexec/lib/python3.14/site-packages/ansible
ansible collection location = /Users/michael/.ansible/collections:/usr/share/ansible/collections
executable location = /opt/homebrew/bin/ansible
python version = 3.14.2 (main, Dec 5 2025, 16:49:16) [Clang 17.0.0 (clang-1700.4.4.1)] (/opt/homebrew/Cellar/ansible/13.1.0/libexec/bin/python)
jinja version = 3.1.6
pyyaml version = 6.0.3 (with libyaml v0.2.5)

Please let me know if you have questions or need clarification.

Thanks.
-Michael

Note from the Author or Editor:
add a slash between the 2 ssl related variables in double curly braces as shown here:

ssl_certificate {{ tls_dir }}/{{ cert_file }};
ssl_certificate_key {{ tls_dir }}/{{ key_file }};

Michael McClellan  Dec 20, 2025  Jan 09, 2026
Page 128
first code paragraph

The loop in the code sample is using the two items: syncdb and collectstatic but the details on the page for a referring to the two tasks migrate and collectstatic.

This may work according to the docs of the ansible-module django_manage, but it's confusing at least. Additionally, the command syndb was removed in community.general 9.0.0 according to the ansible docs.

Note from the Author or Editor:
On page 128 change the last 3 lines in the example to:

loop:
- migrate
- collectstatic

Jan Fader  Jul 06, 2024  Jan 09, 2026
Page 183
5th paragraph, starying with "unfortunately"

Theres a space missing between two words.

"However, we can write it ourselves.In fact,". There is a space missing between ourselves, and In.

Note from the Author or Editor:
Thanks for sending your erratum to my book Ansible Up & Running.

Bas Meijer

Bart den Boer  Jul 26, 2024  Jan 09, 2026