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?