Review: Automate RHCSA Tasks (timed)

Exam rehearsal, 60 minutes, playbooks only. Inventory: dev = node1, test = node2, prod = node3 + node4, webservers = prod. Nothing is installed in `~/ansible/collections` yet. node4 already has a 1 GiB volume group `apps`; the other nodes have no `apps` VG.

Tasks

  1. Install ansible.posix and community.general into ~/ansible/collections from a ~/ansible/collections/requirements.yml that points at http://utility/collections/.
  2. ~/ansible/packages.yml: tmux on dev, vsftpd on test — and on no other group.
  3. ~/ansible/web.yml: on the webservers, /var/www/html/index.html from a template reads Welcome to <host (e.g. Welcome to node3), httpd is started and enabled, and http is allowed in firewalld permanently and immediately. curl http://node3 from control must show it.
  4. ~/ansible/lv.yml on all nodes: create LV web in VG apps of 1200 MiB; if that fails print Could not create a logical volume of that size and create it with 600 MiB; on nodes without VG apps print Volume group does not exist.
  5. ~/ansible/cron.yml: on all nodes, user devops runs logger "WebAsha review" at minute 0 of every hour (cron job named review).
  6. ~/ansible/backup.yml: on prod, archive /etc/httpd/conf into /root/conf.tar.gz (gzip).
  7. ~/ansible/users.yml: user sana in supplementary group webops on the webservers only, password Rev2026! taken from the vault file ~/ansible/vault.yml (variable sanapass, vault password webasha in ~/ansible/vault.txt), hashed with SHA-512.
  8. ~/ansible/selinux.yml: SELinux enforcing (targeted) persistently on all nodes.