mpdehaan/ansible — Issue #82: All playbook patterns implicitly run setup
Author: mpdehaan
Created: 2012-03-05 21:30:24+00:00
State: open

Have a "vars:" block for each pattern

The first step for every pattern is to run the setup module against these vars -- this is implicit.

The variables for setup are saved.

Every future task line for the pattern block is templated against Jinja2 and the pattern variables from the host are used in the templating, allowing facts to bubble up back into the playbook.

And a band of demons joined in, and it sounded something like this

- hosts: *
vars: a=2 b=3 c=4 d=5
tasks:
- name: splat
action: /bin/echo {{ c }} {{ facter_fqdn }}
- ...