Skip to content

Commit 007cb77

Browse files
authored
fix wait_for task when using non-default network interface (#8)
1 parent 9140136 commit 007cb77

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

meta/main.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,17 @@ galaxy_info:
1414
# (usually master) will be used.
1515
github_branch: master
1616

17-
#
18-
# platforms is a list of platforms, and each platform has a name and a list of versions.
19-
#
2017
platforms:
2118
- name: Ubuntu
2219
versions:
2320
- 16.04
21+
- 18.04
2422

2523
galaxy_tags:
2624
- apache
2725
- cassandra
2826
- cluster
2927
- database
3028

29+
# java is a dependency, but to allow flexibility, no particular ansible role is set here. See README.md for details and a java role dependency suggestion.
3130
dependencies: []
32-
# List your role dependencies here, one per line. Be sure to remove the '[]' above,
33-
# if you add dependencies to this list.

tasks/systemd.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
- name: Wait for cassandra to startup
2828
wait_for:
29-
host: "{{ ansible_default_ipv4.address }}"
29+
host: "{{ hostvars[inventory_hostname]['ansible_' + cassandra_network_interface].ipv4.address }}"
3030
port: "{{ item }}"
3131
delay: 5
3232
connect_timeout: 1

0 commit comments

Comments
 (0)