Feature #13812
closedRemote execution provider
Description
Ansible can be used as a provider for remote execution. The job templates can be Ansible playbooks that use host parameters, properties and ERB.
Job templates, however, should have a 'hosts' section that just contains <%= @host.name %>, because a new inventory is generated per host with all the required variables.
In any case, the way it should work is:
Foreman sends request to proxy - including the 'hosts' it's supposed to run on.
Proxy generates an inventory with the hosts and variables required
Proxy runs ansible and reports to Foreman
The reason why ansible_foreman_inventory cannot be used in this case is because it's less flexible than the 'search' field of REX, where one can use the 'scoped_search' syntax to figure out what hosts to run the playbook on. If we used ansible_foreman_inventory for that, we would be forced to run our playbooks on a set of hosts, hostgroups, organiztions or locations.
Updated by Daniel Lobato Garcia almost 9 years ago
- Tracker changed from Bug to Feature
Updated by Daniel Lobato Garcia about 7 years ago
- Precedes Feature #22018: Change PlayHostRoles to rely on REXCore provider added
Updated by Daniel Lobato Garcia about 7 years ago
- Blocks Tracker #22024: Ansible as a Remote Execution provider added
Updated by The Foreman Bot about 7 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman_ansible/pull/117 added
Updated by The Foreman Bot almost 7 years ago
- Pull request https://github.com/theforeman/foreman_ansible/pull/109 added
Updated by Daniel Lobato Garcia almost 7 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset foreman_ansible|a5e0827bc3ec6c8ab82f968907857a15646305d5.