I think you want to look into using dynamic inventories.

Start with http://docs.ansible.com/intro_dynamic_inventory.html.

On Friday, April 24, 2015 at 8:01:22 AM UTC-4, Serega Sheypak wrote:
>
> Hi, I'm new to ansible and have confusion.
> What I have right now:
> ansible+vagrant playbook. Vagrant creates VMs in virtualbox and sets up 
> networking.
> Ansible does provisioning stuff:
> - install
> - configure
> - put some templates
>
> Right now all host names and IP addresses are hardcoded.
> Example for host variable used to configure software.
> /host_vars/dsenode03
> config:
>    cluster_name: 'DSE Cluster'
>    seeds: '192.168.56.10'
>    listen_address: 192.168.56.10
>    rpc_address: 192.168.56.10
>
> Really, I point dsenode03 to dsenode01 (92.168.56.10) 
>
> If I turn to AWS I can't hardcode smth, since names,addresses would be 
> different each time.
> What is the right approach to remove hardcodes? Can I find some examples?
>

-- 
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/497d7a1e-c58e-4979-943f-134e27dab691%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to