RH294 Ch 11: Troubleshoot Playbooks

A colleague left five playbooks in `~/ansible` that do not work. Find and fix the problems with `--syntax-check`, the error messages, check mode and ansible-lint. node1 is in `dev`, node2 in `prod`.

Tasks

  1. Fix web.yml so it passes --syntax-check, then run it: node1 must get /etc/webasha-web.conf containing port=8080.
  2. Fix users.yml (it has two mistakes) and run it: node1 must have user appuser with shell /bin/bash.
  3. Fix handlers.yml so the handler really runs: node2 must end up with both /etc/webasha-app.conf and /etc/webasha-app.restarted.
  4. Do NOT apply dryrun.yml: run it in check mode with diff and save the complete output in ~/ansible/dryrun.txt. node1 must not get /etc/webasha-dryrun.conf.
  5. Fix lint.yml so ansible-lint lint.yml reports no problems, then run it: /opt/webasha-data must exist on both nodes.