Hi all,
First I would like to thank Ansible creators and its great community
because this tool really simplifies my day to day life.
I have the following workflow and I want a piece of advice on *Step 3*:
- Step 1: create n nodes with a cloud provider (lb, app-1, app-2, index,
index-upgrader, db, db-upgrader, log-server, log-store, log-viewer) (*done
with any cloud module*)
- Step 2: generate an inventory with IP/hostnames gathered from my cloud
provider (*done with dynamic inventory modules*).
- *Step 3*: link nodes by alias so that they have knowledge of each
other:
1. log-viewer references log-store
2. log-server references log-store
3. index-upgrader references index
4. db-upgrader references db
5. app-{1,2} references index, db, log-server
6. lb references app-{1,2}
- Step 4: provision and configure nodes with no hardcoded IP adress,
only aliases defined in step 3 (*regular ansible stuff*)
Solution 1: for each node, generate (with templates and lineinfile
directive) the proper hosts file on the nodes manager (the node that runs
ansible and the playbook) and copy the hosts file to the node.
That solution would surely work but I was wondering if there were a more
elegant way.
Solution 2: use a DNS server. It would also do the trick but it's rather
complex for my needs.
Solution 3: An elegant solution would be to "describe" the linking
requirements (like it is done in terraform.io but I don't want to use
another tool, so far ansible covers all my needs) in a file and the module
would look-up relevant information in the inventory, generate linking
artifacts (host files, or whatever) and apply them to corresponding nodes.
Thank you for your advices.
Regards,
Louis
--
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/4eec9de2-9a62-4c72-9aee-b95acffbbf98%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.