geerlingguy / ansible-role-varnish

Ansible Role - Varnish HTTP accelerator
https://galaxy.ansible.com/geerlingguy/varnish/
MIT License
80 stars 88 forks source link

Add different vhosts and different backends from playbook variables #55

Closed clopnis closed 7 years ago

clopnis commented 7 years ago

Add capabality to setup different vhosts and different backends from a playbook variable and not from a specific template. Choose the backend in depend of fqnd of vhost.

Tested on Debian 8.6 with and without the 2 variables

Signed-off-by: Cyril Lopez cylopez@redhat.com

geerlingguy commented 7 years ago

@clopnis - Might it be easier to just do all the work of adding a couple loops inside the default.vcl.j2 file (instead of adding two separate lineinfile tasks)?

clopnis commented 7 years ago

@geerlingguy good idea, I did the change.

clopnis commented 7 years ago

@geerlingguy Could check if it's correct for you now ?

geerlingguy commented 7 years ago

@clopnis - Thanks so much for adding this and the adjustments! I've adjusted the variables to use the plural form (to match style with other similar roles).