Project

General

Profile

Actions

Feature #13812

closed

Remote execution provider

Added by Daniel Lobato Garcia about 8 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Normal
Target version:
-
Fixed in Releases:
Found in Releases:

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.


Related issues 2 (0 open2 closed)

Blocks Ansible - Tracker #22024: Ansible as a Remote Execution providerClosed12/18/2017

Actions
Precedes Ansible - Feature #22018: Change PlayHostRoles to rely on REXCore providerClosedDaniel Lobato Garcia02/22/201602/22/2016Actions
Actions #1

Updated by Daniel Lobato Garcia about 8 years ago

  • Tracker changed from Bug to Feature
Actions #2

Updated by Daniel Lobato Garcia over 6 years ago

  • Precedes Feature #22018: Change PlayHostRoles to rely on REXCore provider added
Actions #3

Updated by Daniel Lobato Garcia over 6 years ago

Actions #4

Updated by The Foreman Bot over 6 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman_ansible/pull/117 added
Actions #5

Updated by The Foreman Bot over 6 years ago

  • Pull request https://github.com/theforeman/foreman_ansible/pull/109 added
Actions #6

Updated by Daniel Lobato Garcia over 6 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF