Hi to all...I need a help with this particular problem. I'm not so skillful
with Ansible so any help I would appreciate.
I have let say 10 hosts and I need to deploy specific configuration files
to all of them, but not not al files on all hosts.
eg.
10 config files - config1 to config10
10 hosts - host1 to host 10
3 groups - group1 (host1 to host4), group2 (host5 to host7), group3 (host8
to host10)
I need config1-config5 deploy to all hosts, but other conifg files are
group/host specific. How to make the exception here.
Also, group1 and group1 have only one filesystem where I need to deploy
that configuration. But group3 has 3 filesystems where I need to deploy
specific config files (config1-config5 to all FS, some other only on some
hosts and some FS in this group).
config1-config5 to all hosts and all FS on hosts (because there could be
multiple fs on some host)
So my main worry is how to specific which files goes to which host, and
how to deploy same config files to multiple FS on same host.
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).
Also how to specify which cofnig files (templates) goes to which host (FS).
Thanks a lot for any help.
--
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/1c4ce714-bcda-45c0-b46e-8aa30863d896%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.