Skip to content

Commit 81e61dd

Browse files
authored
if hostname on target machine is not set to FQDN, using ansible_hostname (#16)
as an index to hostvars will lead to an undefined key error.
1 parent 2e815cd commit 81e61dd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

templates/cqlsh.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/usr/bin/env bash
22

3-
/opt/cassandra/bin/cqlsh {{ hostvars[ansible_hostname]["ansible_" + cassandra_network_interface]["ipv4"]["address"] }} "$@"
3+
/opt/cassandra/bin/cqlsh {{ hostvars[inventory_hostname]["ansible_" + cassandra_network_interface]["ipv4"]["address"] }} "$@"

0 commit comments

Comments
 (0)