4 ms·
I'm just starting to use Ansible for a major deployment at work, so I am not an expert- can anyone who knows more explain why "ansible_connection" exists as a h
by ensignavenger 10y ago
I'm just starting to use Ansible for a major deployment at work, so I am not an expert- can anyone who knows more explain why "ansible_connection" exists as a host definable fact? The controller already knows what host it is connecting to when it retrieves the fact, so why can the host change it?
- bcoca 10y agoit is not a host definable fact, it is a 'host variable' which you normally define in inventory.
- ensignavenger 10y agoFrom the advisory: When Ansible runs on a host, a JSON object with Facts is returned to the Controller. The Controller uses these facts for various housekeeping purposes. Some facts have special meaning, like the fact "ansible_python_interpreter" and "ansible_connection". So while you may normally define it in the inventory, it sounds like, from the advisory, it can also be defined by the host.