Every Run Adds Another Line
The playbook /home/student/ansible/tuning.yml prepares the web servers. It was run three times last week, and now /etc/shop/limits.conf on web1 and web2 has the same lines three times, and the folder /var/lib/shop was created with the wrong permissions. Every run also reports changed for every task.
Rewrite tuning.yml so that, on every host in group web:
/etc/shop/limits.conf contains the line max_connections=333 exactly once, and the line timezone=Europe/Berlin exactly once. Other lines in the file stay as they are./var/lib/shop is a directory owned by root, mode 0750.changed=0) on any host.Run it from /home/student/ansible. Don't use changed_when to hide changes.
About this machine
Ubuntu 24.04 with no internet access and ansible-core installed. Three managed hosts sit next to it: web1, web2 and db1, separate machines with systemd and Python, reached over ssh as root. Only the ansible.builtin modules are available, and nothing can be downloaded. The grader runs your playbooks and checks the hosts' final state, not the commands you typed.
Part of Ansible from Zero. Next step: Which Value Wins
Teaching or writing about this? Embed this lab on your page
Your machine is ready to start
A fresh, isolated Ubuntu machine boots in a few seconds with the task already set up.
No account needed: 3 of 3 free tries left. Guest machines last 30 minutes.