Commit 3ed9a75a authored by Ross McDonald's avatar Ross McDonald
Browse files

Added is_vagrant variable, modified defaults file to modify logic depending on...

Added is_vagrant variable, modified defaults file to modify logic depending on whether running on vagrant.
parent 35b8dab7
......@@ -29,6 +29,9 @@ Vagrant.configure(2) do |config|
ansible.playbook = "test.yml"
ansible.sudo = true
ansible.host_key_checking = false
ansible.extra_vars = {
is_vagrant: true,
}
end
end
......
INFLUXD_OPTS="-hostname {{ ansible_hostname }}{% if influxdb_cluster_servers %} -join {% for host in groups['influxdb']|sort %}{% if hostvars[host]['ansible_hostname'] != ansible_hostname %}{{ hostvars[host]['ansible_hostname'] }}:{{ influxdb_meta_port }}{% if not loop.last %},{% endif %}{% endif %}{% endfor %}{% endif %}"
INFLUXD_OPTS="-hostname {{ ansible_hostname }}{% if influxdb_cluster_servers %} -join {% if is_vagrant %}{% for host in groups['all']|sort %}{% if hostvars[host]['ansible_hostname'] != ansible_hostname %}{{ hostvars[host]['ansible_hostname'] }}:{{ influxdb_meta_port }}{% if not loop.last %},{% endif %}{% endif %}{% endfor %}{% endif %}{% if not is_vagrant %}{% for host in groups['influxdb']|sort %}{% if hostvars[host]['ansible_hostname'] != ansible_hostname %}{{ hostvars[host]['ansible_hostname'] }}:{{ influxdb_meta_port }}{% if not loop.last %},{% endif %}{% endif %}{% endfor %}{% endif %}{% endif %}"
---
# Whether or not the playbook is run locally (changes clustering logic slightly)
is_vagrant: no
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment