From baf0553a3631eccc4072516d2ffae40471885537 Mon Sep 17 00:00:00 2001 From: Kevin Carter Date: Tue, 25 Oct 2016 14:36:21 -0500 Subject: [PATCH] Remove deprecated ansible_ssh_host variable This changes 'ansible_ssh_host' to 'ansible_host'. The 'ansible_ssh_host' variable has been deprecated as noted here: [0]. [0] - http://docs.ansible.com/ansible/intro_inventory.html#hosts-and-groups Change-Id: Ie34bb924b55d4e1c7b4568c2eadd2a7a1a60a821 Related-Bug: #1636606 Signed-off-by: Kevin Carter --- cluster_metrics/playbook-influx-db.yml | 2 +- cluster_metrics/templates/kapacitor.conf.j2 | 2 +- cluster_metrics/templates/telegraf.conf.j2 | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cluster_metrics/playbook-influx-db.yml b/cluster_metrics/playbook-influx-db.yml index 3ec62be2..306bef96 100644 --- a/cluster_metrics/playbook-influx-db.yml +++ b/cluster_metrics/playbook-influx-db.yml @@ -49,7 +49,7 @@ state: restarted - name: Wait for influxdb to be ready wait_for: - host: "{{ hostvars[groups['cluster-metrics'][0]]['ansible_ssh_host'] }}" + host: "{{ hostvars[groups['cluster-metrics'][0]]['ansible_host'] }}" port: "{{ influxdb_port }}" delay: 1 - name: Create metrics DB diff --git a/cluster_metrics/templates/kapacitor.conf.j2 b/cluster_metrics/templates/kapacitor.conf.j2 index 6b0f85e4..c3cca5c2 100644 --- a/cluster_metrics/templates/kapacitor.conf.j2 +++ b/cluster_metrics/templates/kapacitor.conf.j2 @@ -27,7 +27,7 @@ data_dir = "/var/lib/kapacitor" enabled = true name = "[% influxdb_db_name %]" default = true - urls = ["http://[% hostvars[groups['cluster-metrics'][0]]['ansible_ssh_host'] %]:[% influxdb_port %]"] + urls = ["http://[% hostvars[groups['cluster-metrics'][0]]['ansible_host'] %]:[% influxdb_port %]"] username = "[% influxdb_db_root_name %]" password = "[% influxdb_db_root_password %]" ssl-ca = "" diff --git a/cluster_metrics/templates/telegraf.conf.j2 b/cluster_metrics/templates/telegraf.conf.j2 index ba9ff9ce..ce06cf97 100644 --- a/cluster_metrics/templates/telegraf.conf.j2 +++ b/cluster_metrics/templates/telegraf.conf.j2 @@ -23,7 +23,7 @@ omit_hostname = false [[outputs.influxdb]] - urls = ["http://{{ hostvars[groups['cluster-metrics'][0]]['ansible_ssh_host'] }}:{{ influxdb_port }}"] + urls = ["http://{{ hostvars[groups['cluster-metrics'][0]]['ansible_host'] }}:{{ influxdb_port }}"] database = "{{ influxdb_db_name }}" precision = "s" write_consistency = "any"