diff --git a/playbooks/bootstrap_kafka.yml b/playbooks/bootstrap_kafka.yml new file mode 100644 index 0000000..037275b --- /dev/null +++ b/playbooks/bootstrap_kafka.yml @@ -0,0 +1,13 @@ +--- +- include: create_kafka_groups.yml + +- name: Apply the common role to all nodes + hosts: kafka-cluster + any_errors_fatal: true + become: yes + pre_tasks: + - name: Show hadoop-cluster info + debug: var=hostvars[inventory_hostname] + when: debug + roles: + - common diff --git a/playbooks/roles/common/tasks/main.yml b/playbooks/roles/common/tasks/main.yml index 4be618f..ee6b236 100644 --- a/playbooks/roles/common/tasks/main.yml +++ b/playbooks/roles/common/tasks/main.yml @@ -157,7 +157,6 @@ template: src=hosts.j2 dest=/etc/hosts mode=0644 when: distro == "hdp" or distro == "cdp" - - name: Set hosts file template: src=kafka_hosts.j2 dest=/etc/hosts mode=0644 when: not azure and distro == "cc" diff --git a/playbooks/roles/common/templates/kafka_hosts.j2 b/playbooks/roles/common/templates/kafka_hosts.j2 new file mode 100644 index 0000000..b67c12a --- /dev/null +++ b/playbooks/roles/common/templates/kafka_hosts.j2 @@ -0,0 +1,5 @@ +127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 +::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 +{% for node in groups['kafka-cluster'] %} +{{ hostvars[node]['ansible_'~hostvars[node].cluster_interface|default(hostvars[node].ansible_default_ipv4.alias)]['ipv4']['address'] }} {{ hostvars[node]['ansible_nodename'] }} {{ hostvars[node]['ansible_hostname'] }} +{% endfor %} diff --git a/playbooks/roles/confluent-community-broker/tasks/main.yml b/playbooks/roles/confluent-community-broker/tasks/main.yml index e1ddaad..cac0a15 100644 --- a/playbooks/roles/confluent-community-broker/tasks/main.yml +++ b/playbooks/roles/confluent-community-broker/tasks/main.yml @@ -69,7 +69,7 @@ - name: start ksql server systemd: - name: confluent-ksql + name: confluent-ksqldb state: started - name: start schema registry diff --git a/playbooks/roles/confluent-community-common/files/confluent.repo b/playbooks/roles/confluent-community-common/files/confluent.repo index a4179af..1a42437 100644 --- a/playbooks/roles/confluent-community-common/files/confluent.repo +++ b/playbooks/roles/confluent-community-common/files/confluent.repo @@ -1,6 +1,13 @@ -[Confluent-5.4] -name=Confluent repository for 5.4.x packages -baseurl=https://packages.confluent.io/rpm/5.4 +[Confluent.dist] +name=Confluent repository (dist) +baseurl=https://packages.confluent.io/rpm/5.5/7 gpgcheck=1 -gpgkey=https://packages.confluent.io/rpm/5.4/archive.key -Enabled=1 +gpgkey=https://packages.confluent.io/rpm/5.5/archive.key +enabled=1 + +[Confluent] +name=Confluent repository +baseurl=https://packages.confluent.io/rpm/5.5 +gpgcheck=1 +gpgkey=https://packages.confluent.io/rpm/5.5/archive.key +enabled=1 diff --git a/playbooks/roles/confluent-community-common/tasks/main.yml b/playbooks/roles/confluent-community-common/tasks/main.yml index 9499c1e..4071d58 100644 --- a/playbooks/roles/confluent-community-common/tasks/main.yml +++ b/playbooks/roles/confluent-community-common/tasks/main.yml @@ -26,7 +26,7 @@ - name: add gpg key rpm_key: state: present - key: https://packages.confluent.io/rpm/5.4/archive.key + key: https://packages.confluent.io/rpm/5.5/archive.key - name: Ensure required packages are installed (yum) yum: