dimakis.rhosak_test.create_kafka_topic (1.0.0) — module

Create a topic on a Red Hat OpenShift Streams for Apache Kafka Instance

| "added in version" 0.1.0 of dimakis.rhosak_test"

Authors: Red Hat Developer

Install collection

Install with ansible-galaxy collection install dimakis.rhosak_test:==1.0.0


Add to requirements.yml

  collections:
    - name: dimakis.rhosak_test
      version: 1.0.0

Description

Create a topic on a Red Hat OpenShift Streams for Apache Kafka Instance

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Pass in a message
  - name: Create Kafka Topic
    create_kafka_topic:
      name: "kafka-topic-name"
      kafka_id: "{{ kafka_req_resp.id }}"
      partitions: 1
      retention_period_ms: "86400000"
      retention_size_bytes: "1073741824"
      cleanup_policy: "compact"
    register:
      create_topic_res_obj

Inputs

    
name:
    description: Name of the Kafka instance
    required: true
    type: str

kafka_id:
    description: ID of the Kafka instance
    required: true
    type: str

partitions:
    description: Number of partitions for the topic
    required: false
    type: int

cleanup_policy:
    description: Cleanup policy for the topic
    required: false
    type: str

kafka_admin_url:
    description: Admin URL of the Kafka instance
    required: false
    type: str

retention_period_ms:
    description: Retention period in milliseconds for the topic
    required: false
    type: str

retention_size_bytes:
    description: Retention size in bytes for the topic
    required: false
    type: str

Outputs

create_topic_res_obj:
  description: The configuration of the topic that was created
  returned: always upon successful creation of a topic
  type: dict
kafka_admin_resp_obj:
  description: The response object from the Kafka Admin REST API which details the
    Kafka instance
  returned: if no Kafka Admin URL is provided in the module parameters and the Kafka
    Admin URL is retrieved from the Kafka Admin REST API
  type: dict
kafka_admin_url:
  description: The Kafka Admin URL of the Kafka instance
  returned: if no Kafka Admin URL is provided in the module parameters and the Kafka
    Admin URL is retrieved from the Kafka Admin REST API
  type: str
message:
  description: A message detailing topic created succesfully.
  returned: always in case of successful execution
  sample: Topic created successfully
  type: str
original_message:
  description: The original params that were passed in.
  returned: always in case of successful execution
  type: dict