Skip to content

Commit 24d63b2

Browse files
Merge branch '7.8.x' into 7.9.x by rkunwar-28
2 parents 97bde6c + cd73154 commit 24d63b2

File tree

2 files changed

+153
-0
lines changed

2 files changed

+153
-0
lines changed
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
---
2+
##
3+
## The following is an example inventory file for deploying Confluent Platform
4+
## using AWS Systems Manager (SSM) as the connection method with hostname aliasing enabled.
5+
##
6+
## For full SSM setup details, prerequisites, and configuration, see:
7+
## https://docs.confluent.io/ansible/7.9/ansible-prepare.html#manage-connections-to-cp-hosts
8+
##
9+
## When using SSM, ansible_host must contain the EC2 Instance ID for SSM to connect.
10+
## Since hostname_aliasing_enabled uses ansible_host as a fallback for resolving
11+
## the internal hostname, you must explicitly set the "hostname" variable on each host
12+
## to the actual network address (FQDN or IP) so that Confluent Platform components
13+
## can communicate with each other correctly.
14+
##
15+
## Resolution order when hostname_aliasing_enabled is true:
16+
## 1. hostname (host variable)
17+
## 2. ansible_host (fallback - but this is the Instance ID with SSM, so don't rely on it)
18+
## 3. inventory_hostname (final fallback)
19+
##
20+
## Usage:
21+
## ansible-playbook -i docs/sample_inventories/ssm/ssm_hostname_aliasing.yml confluent.platform.all
22+
23+
all:
24+
vars:
25+
## SSM Connection Settings
26+
ansible_connection: amazon.aws.aws_ssm
27+
ansible_aws_ssm_region: "us-east-2"
28+
ansible_aws_ssm_bucket_name: "cp-ansible-ssm-staging-bucket"
29+
ansible_become: true
30+
31+
## Enable hostname aliasing so that the "hostname" variable is used
32+
## for internal CP component addressing instead of ansible_host (which holds the Instance ID).
33+
hostname_aliasing_enabled: true
34+
35+
kafka_controller:
36+
hosts:
37+
kc1:
38+
ansible_host: i-0a1b2c3d4e5f60001
39+
hostname: ip-172-31-10-101.us-east-2.compute.internal
40+
kc2:
41+
ansible_host: i-0a1b2c3d4e5f60002
42+
hostname: ip-172-31-10-102.us-east-2.compute.internal
43+
kc3:
44+
ansible_host: i-0a1b2c3d4e5f60003
45+
hostname: ip-172-31-10-103.us-east-2.compute.internal
46+
47+
kafka_broker:
48+
hosts:
49+
kb1:
50+
ansible_host: i-0a1b2c3d4e5f60004
51+
hostname: ip-172-31-10-104.us-east-2.compute.internal
52+
kb2:
53+
ansible_host: i-0a1b2c3d4e5f60005
54+
hostname: ip-172-31-10-105.us-east-2.compute.internal
55+
kb3:
56+
ansible_host: i-0a1b2c3d4e5f60006
57+
hostname: ip-172-31-10-106.us-east-2.compute.internal
58+
59+
schema_registry:
60+
hosts:
61+
sr1:
62+
ansible_host: i-0a1b2c3d4e5f60007
63+
hostname: ip-172-31-10-107.us-east-2.compute.internal
64+
65+
kafka_connect:
66+
hosts:
67+
kc-connect1:
68+
ansible_host: i-0a1b2c3d4e5f60008
69+
hostname: ip-172-31-10-108.us-east-2.compute.internal
70+
71+
kafka_rest:
72+
hosts:
73+
kr1:
74+
ansible_host: i-0a1b2c3d4e5f60009
75+
hostname: ip-172-31-10-109.us-east-2.compute.internal
76+
77+
ksql:
78+
hosts:
79+
ksql1:
80+
ansible_host: i-0a1b2c3d4e5f60010
81+
hostname: ip-172-31-10-110.us-east-2.compute.internal
82+
83+
control_center_next_gen:
84+
hosts:
85+
c3ng1:
86+
ansible_host: i-0a1b2c3d4e5f60011
87+
hostname: ip-172-31-10-111.us-east-2.compute.internal
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
---
2+
##
3+
## The following is an example inventory file for deploying Confluent Platform
4+
## using AWS Systems Manager (SSM) as the connection method without hostname aliasing.
5+
##
6+
## For full SSM setup details, prerequisites, and configuration, see:
7+
## https://docs.confluent.io/ansible/7.9/ansible-prepare.html#manage-connections-to-cp-hosts
8+
##
9+
## When hostname_aliasing_enabled is false (default), the resolve_hostname filter
10+
## returns inventory_hostname. Therefore, the inventory hostname must be the actual
11+
## network address (FQDN) of the EC2 instance, and ansible_host holds the Instance ID
12+
## for SSM to connect.
13+
##
14+
## Usage:
15+
## ansible-playbook -i docs/sample_inventories/ssm/ssm_without_hostname_aliasing.yml confluent.platform.all
16+
17+
all:
18+
vars:
19+
## SSM Connection Settings
20+
ansible_connection: amazon.aws.aws_ssm
21+
ansible_aws_ssm_region: "us-east-2"
22+
ansible_aws_ssm_bucket_name: "cp-ansible-ssm-staging-bucket"
23+
ansible_become: true
24+
25+
kafka_controller:
26+
hosts:
27+
ip-172-31-10-101.us-east-2.compute.internal:
28+
ansible_host: i-0a1b2c3d4e5f60001
29+
ip-172-31-10-102.us-east-2.compute.internal:
30+
ansible_host: i-0a1b2c3d4e5f60002
31+
ip-172-31-10-103.us-east-2.compute.internal:
32+
ansible_host: i-0a1b2c3d4e5f60003
33+
34+
kafka_broker:
35+
hosts:
36+
ip-172-31-10-104.us-east-2.compute.internal:
37+
ansible_host: i-0a1b2c3d4e5f60004
38+
ip-172-31-10-105.us-east-2.compute.internal:
39+
ansible_host: i-0a1b2c3d4e5f60005
40+
ip-172-31-10-106.us-east-2.compute.internal:
41+
ansible_host: i-0a1b2c3d4e5f60006
42+
43+
schema_registry:
44+
hosts:
45+
ip-172-31-10-107.us-east-2.compute.internal:
46+
ansible_host: i-0a1b2c3d4e5f60007
47+
48+
kafka_connect:
49+
hosts:
50+
ip-172-31-10-108.us-east-2.compute.internal:
51+
ansible_host: i-0a1b2c3d4e5f60008
52+
53+
kafka_rest:
54+
hosts:
55+
ip-172-31-10-109.us-east-2.compute.internal:
56+
ansible_host: i-0a1b2c3d4e5f60009
57+
58+
ksql:
59+
hosts:
60+
ip-172-31-10-110.us-east-2.compute.internal:
61+
ansible_host: i-0a1b2c3d4e5f60010
62+
63+
control_center_next_gen:
64+
hosts:
65+
ip-172-31-10-111.us-east-2.compute.internal:
66+
ansible_host: i-0a1b2c3d4e5f60011

0 commit comments

Comments
 (0)