All,

I'm after some advice here on the best way of getting a template file
populated with one or more network ranges based on the host the file is
copied onto.

So, basically I'll have 15+ hosts that will be running a program where one
of the configuration files will contain one or more network ranges that
varies with the host it is being installed on.

I'm trying to figure out where it is best to store these variables? Would
it be in the inventory file or a local variable file for the role I'm
creating?

The file looks something like this:

<- Cut ->
10.0.0.0/8          Private IP space
172.16.0.0/12       Private IP space
192.168.0.0/16      Private IP space
{{ ipranges }}
<- Cut ->

Where 'ipranges' is supposed to be one or more public ranges from the site
in question. (I'm not even sure at this stage if I can have 'multi-value'
variables like this? Ie, one site could have a range of say 1.1.1.1/20 and
the other could have two ranges .2.2.2.2/24 and 3.3.3.3/20 and I'd like
them to be on one line each)

Have anyone else done something similar to this and have the time to give
me a nudge in the correct direction? I'm sort of changing my mind about the
best way of doing this as well as which way would be easiest to
document/maintain in the long run?

Thanks in advance, Mike

-- 
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/CAMuthMfiYY7UQSa_LVOYHHXDZkEY1q6SYRSymPyJ%3DKaM%3DgK%2BYA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to