Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Copy Kafka Connect Files" task should be executed after "Install Connect Plugins" #1766

Open
jwich71 opened this issue Aug 20, 2024 · 0 comments

Comments

@jwich71
Copy link

jwich71 commented Aug 20, 2024

Sometimes it is necessary to store additional jar files within the connector plugin directories in order to extend their function.

There is kafka_connect_copy_files for distributing such custom files. Unfortunately, the corresponding task “Copy Kafka Connect Files” is executed before the installation of the actual Connect plugins, so that the files are overwritten again.

It would therefore make more sense to run the “Copy Kafka Connect Files” task after installing the plugins (task “Install Connect Plugins”).

Example in Inventory File:

    kafka_connect_copy_files:
      # ibm client jar for mq sink connector
      - source_path: "{{ inventory_dir }}/connect_plugins/com.ibm.mq.allclient.jar"
        destination_path: /usr/share/java/confluentinc-kafka-connect-ibmmq/
      - source_path: "{{ inventory_dir }}/connect_plugins/com.ibm.mq.allclient.jar"
        destination_path: /usr/share/java/confluentinc-kafka-connect-ibmmq-sink/

Related yml file:
~/.ansible/collections/ansible_collections/confluent/platform/roles/kafka_connect/tasks/main.yml

204 - name: Install Connect Plugins
205   include_tasks: connect_plugins.yml
206
207 ### Workaround ###
208 - name: Copy Kafka Connect Files
209   include_role:
210     name: common
211     tasks_from: copy_files.yml
212   vars:
213     copy_files: "{{kafka_connect_copy_files}}"
214     user: "{{kafka_connect_user}}"
215     group: "{{kafka_connect_group}}"
216   when: kafka_connect_copy_files | length > 0
217   tags:
218     - configuration

Environment:

  • OS: Red Hat Enterprise Linux release 8.10 (Ootpa)
  • CP-Ansible Branch: 7.5.0-post
  • Ansible Version: ansible [core 2.14.2]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant