ansible-labs/40.Handlers/40.Handlers.md

550 B

40 - Handlers

This exercise makes you use handlers to control flow execution.

Playbook creation

Write a playbook following the given specs:

  • Run on host group lab
  • Install a web server (eg. nginx or httpd) on each host using the module adapted to the package manager of your hosts
  • Trigger a handler that starts the corresponding service (using appropriate module as well)

Validation

Run the playbook and checks if the service is installed and started.

There is a working playbook in solution/solution.yml (for an Alpine host)