Skip to content

Commit 67ab90f

Browse files
author
Bharat Kunwar
committed
Only write ProxyJump host ip to inventory when cluster_gw_group is defined
1 parent 3922bf4 commit 67ab90f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

templates/cluster_inventory.j2

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,11 @@ cluster
2121

2222
[{{ cluster_name }}_{{ group_data.group }}:vars]
2323
ansible_user={{ cluster_params.cluster_groups | selectattr("name", "equalto", group_data.group) | map(attribute='user') | join }}
24+
{% if cluster_gw_group is defined %}
2425
{% if cluster_gw_group != group_data.group %}
2526
ansible_ssh_common_args='-o ProxyJump={{ cluster_gw_user }}@{{ cluster_gw_ip }}'
2627
{% endif %}
28+
{% endif %}
2729

2830
{% endfor %}
2931
# Specific roles for cluster deployment assignments

0 commit comments

Comments
 (0)