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

  1. Install the collections ansible.posix and community.general from utility into ~/ansible/collections using ~/ansible/collections/requirements.yml.
  2. 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).
  3. 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.
  4. On dev, generate /etc/myhosts from a template: one line per inventory host with its IPv4 address, FQDN and short name.
  5. On dev and test: group webdev and directory /webdev owned by group webdev with mode 2775.
  6. On all nodes, add a cron job for user devops that runs logger "WebAsha check" every 2 minutes.
  7. On all nodes, create /root/report.txt with the lines HOST=<inventory hostname and MEMORY=<total memory in MB.
  8. 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.