On 05. des. 2016 09:45, vu001 wrote:
So I started to define FS variable on all hosts or groups if it is
possible.
Then I created 10 templates. In every template is some host specific
variable references.
With this simple task I accomplish main idea.

- name: Deploy configuration files
  template: src=config1.j2 dest={{FS }}/config1

But I need some ideas how to deploy this on multiple FS on same host. Is it
possible to define array of FS (somewhere this array would have only one
element, somewhere would have 3 elements) and then deploy this on all
elements of array (which is basically location on filesystem where to
deploy configuration).

Make FS a list, then you can do this

- name: Deploy configuration files
  template: src=config1.j2 dest={{ item }}/config1
  with_items: "{{ FS }}"

--
Kai Stian Olstad

--
You received this message because you are subscribed to the Google Groups "Ansible 
Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/576c4e3d-d46d-cae8-6987-15f9753e59bd%40olstad.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to