fgci-org / fgci-ansible

:microscope: Collection of the Finnish Grid and Cloud Infrastructure Ansible playbooks
MIT License
54 stars 18 forks source link

Force handlers and set ansible_min_version to 2.0 #139

Closed martbhell closed 8 years ago

martbhell commented 8 years ago

From http://docs.ansible.com/ansible/playbooks_error_handling.html#handlers-and-failure

: "When a task fails on a host, handlers which were previously notified will not be run on that host. This can lead to cases where an unrelated failure can leave a host in an unexpected state. For example, a task could update a configuration file and notify a handler to restart some service. If a task later on in the same play fails, the service will not be restarted despite the configuration change."

martbhell commented 8 years ago

Could it be bad to force handlers to run? Would be nice to go through the roles which has handlers and think of each - could there be an issue if it fails in the middle of the role or if two roles depend on each other could that cause something bad?

Below are the roles which have handlers (and not just an almost empty file):

$ grep -v -e ^$ -e ^# -e '---' roles/*/handlers/main.yml|cut -d ":" -f1|sort|uniq