splunk / splunk-platform-automator

Ansible framework providing a fast and simple way to spin up complex Splunk environments.
Apache License 2.0
117 stars 46 forks source link

cleaning or correcting ansible connection info when vagrant reload or vagrant provision is run #8

Closed kundeng closed 5 years ago

kundeng commented 5 years ago

Describe the bug I made a change to the splunk_config.yml to add a new server. Note:

I then ran vagrant reload. Later I also tried vagrant up --provision

Later I found out that an existing/used IP by other hosts was assigned to the new host in ansible_ssh_info.yml, which causes conflict.

I do notice that a new and correct IP IS re-assigned in hosts file for all hosts.

splunkenizer commented 5 years ago

The Vagrant file does calculate the IP address from the starting IP set in the general stanza. The calculation is done everytime the vagrant file runs. If there is a host added in the middle, the sequence is broken and the new host gets the same IP as the machine, which had the same position before. To add another host after the deployment, either add them at the end or assign static IPs, using 'ip_addr' field on the host level as described in the examples/configuration_description.yml