Provision aws hosts

42 views
Skip to first unread message

Serega Sheypak

unread,
Apr 24, 2015, 8:01:22 AM4/24/15
to ansible...@googlegroups.com
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?

Brenda Bell

unread,
Apr 28, 2015, 9:42:37 PM4/28/15
to ansible...@googlegroups.com
I think you want to look into using dynamic inventories.

Reply all
Reply to author
Forward
0 new messages