ansible/ansible — pull request #1255 by dagwieers (2012-10-08 13:19:40+00:00)
Title: Add this module's namespace to the 'module_' namespace.

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')
```