Skip to content

Commit 6481b04

Browse files
committed
Only use instance_prefix when creating or checking linodes. Use instance.label for everything else
1 parent d49be25 commit 6481b04

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

apps/manual-kafka-cluster/provision.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,12 @@
8484
linode.cloud.domain_record:
8585
api_token: '{{ api_token }}'
8686
domain_id: '{{ domain_info.domain.id }}'
87-
name: '{{ instance_prefix + item }}'
88-
target: '{{ info.results[item|int-1].instance.ipv4[0] }}'
87+
name: '{{ item.instance.label }}'
88+
target: '{{ item.instance.ipv4[0] }}'
8989
ttl_sec: '{{ ttl_sec | default(omit) }}'
9090
type: 'A'
9191
state: present
92-
with_sequence: count='{{ cluster_size }}'
92+
with_items: "{{ info.results }}"
9393
when:
9494
- domain_name|d(False)
9595
- domain_info|d(False)
@@ -103,9 +103,9 @@
103103
kafka_data:
104104
server:
105105
{%- for count in range(cluster_size) %}
106-
- name: {{instance_prefix}}{{ count + 1 }}
106+
- name: {{ info.results[count].instance.label }}
107107
instance:
108-
hostname: {{instance_prefix}}{{ count + 1 }}{% if domain_name|d(False) and domain_info %}.{{ domain_name }}{% endif %}
108+
hostname: {{ info.results[count].instance.label }}{% if domain_name|d(False) and domain_info %}.{{ domain_name }}{% endif %}
109109
ip_pub1: {{ info.results[count].instance.ipv4[0] }}
110110
ip_priv1: {{ info.results[count].instance.ipv4[1] }}
111111
{%- endfor %}

0 commit comments

Comments
 (0)