This is useful mostly for playbooks that run unattended and for a limited set of systems. In case of provisioninging this plugin (together with a final mail action) helps to get notified when something went wrong, or when the installation finished successfully.
Unfortunately, there is no way to enable/disable a plugin from a playbook. So installing the plugin means all other use-cases (provisioning, troubleshooting, reporting or management) all send mails on failure. Something we may want to fix in the future...
Sending mails could be part of the workflow to have teams/responsibles perform specific task. Or simply to notify that a process has finished successfully (e.g. provisioning).
This workaround is recommended from HP iLO's documentation, but may not be sufficient in all cases. Time will tell.
I also made a few cosmetic changes with no impact.
On RHEL5 and RHEL6 there is not argparse, and 'make rpm' fails because of this.
With this change it works, and I can test and fix my own documentation...
Much like we currently have *setup* register the variable `module_setup`, we would like other facts-modules register their own namespace. This means that:
- *network_facts* registers `module_network`
- *hpilo_facts* registers `module_hw`
- *vsphere_facts* registers `module_hw`
In retrospect, it would have made more sense to have `setup` register `module_ansible` instead as the setup module uses the `ansible_` namesepace.
Having the `module_` namespace allows us to check whether a certain namespace has already been loaded so we can avoid running the facts module a second time using only_if.
```yaml
- action: network_facts host=${ansible_hostname_short}
only_if: is_unset('$module_network')
```