RH294 Part 1 Review: Timed Practice Exam
Timed review of the whole RH294 track — give yourself 60 minutes. `~/ansible` already has ansible.cfg and the inventory (`dev`: node1, `test`: node2, `prod`: node3 node4, `webservers` = prod). Content lives on utility: collections at `http://utility/collections/`, a role at `http://utility/roles/sysbanner.tar.gz` and an empty Git repository `http://utility/git/review.git`. Write every playbook in `~/ansible`.
Tasks
- Install the collections ansible.posix and community.general from utility into ~/ansible/collections using ~/ansible/collections/requirements.yml.
- Install the role sysbanner from http://utility/roles/sysbanner.tar.gz into ~/ansible/roles with a requirements file, and apply it to webservers with bannertext set to Production server - authorized access only (playbook banner.yml).
- Create the vault file ~/ansible/vault.yml (vault password webasha, stored in ~/ansible/secret.txt) defining devpass: Dev@123. With playbook users.yml, create user alice on dev with that password.
- On dev, generate /etc/myhosts from a template: one line per inventory host with its IPv4 address, FQDN and short name.
- On dev and test: group webdev and directory /webdev owned by group webdev with mode 2775.
- On all nodes, add a cron job for user devops that runs logger "WebAsha check" every 2 minutes.
- On all nodes, create /root/report.txt with the lines HOST=<inventory hostname and MEMORY=<total memory in MB.
- Put ~/ansible under Git and push it to http://utility/git/review.git (branch main); the pushed tree must contain banner.yml and users.yml.