Skip to content

Commit

Permalink
[ANSIENG-2966] | Update uri module to get Jolokia json output
Browse files Browse the repository at this point in the history
  • Loading branch information
mansisinha committed Jan 25, 2024
1 parent 574d3cd commit dc83901
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions playbooks/ZKtoKraftMigration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,24 +22,26 @@
uri:
url: "{{ 'https' if kafka_controller_jolokia_ssl_enabled|bool else 'http' }}://localhost:{{kafka_controller_jolokia_port}}/jolokia/read/kafka.controller:type=KafkaController,name=ZkMigrationState"
validate_certs: false
return_content: true
status_code: 200
retries: "{{ metadata_migration_retries }}"
delay: 90
until: jolokia_output.json.value.Value == 1
until: ( jolokia_output.content | from_json ).value.Value == 1
register: jolokia_output
when: jolokia_auth_mode == "none"

- name: Wait for Metadata Migration when Basic Jolokia auth
uri:
url: "{{ 'https' if kafka_controller_jolokia_ssl_enabled|bool else 'http' }}://localhost:{{kafka_controller_jolokia_port}}/jolokia/read/kafka.controller:type=KafkaController,name=ZkMigrationState"
validate_certs: false
return_content: true
force_basic_auth: true
url_username: "{{ jolokia_user }}"
url_password: "{{ jolokia_password }}"
status_code: 200
retries: "{{ metadata_migration_retries }}"
delay: 90
until: jolokia_output.json.value.Value == 1
until: ( jolokia_output.content | from_json ).value.Value == 1
register: jolokia_output
when: jolokia_auth_mode == "basic"

Expand Down Expand Up @@ -138,24 +140,26 @@
uri:
url: "{{ 'https' if kafka_controller_jolokia_ssl_enabled|bool else 'http' }}://localhost:{{kafka_controller_jolokia_port}}/jolokia/read/kafka.controller:type=KafkaController,name=ZkMigrationState"
validate_certs: false
return_content: true
status_code: 200
retries: "{{ metadata_migration_retries }}"
delay: 90
until: jolokia_output.json.value.Value == 3
until: ( jolokia_output.content | from_json ).value.Value == 3
register: jolokia_output
when: jolokia_auth_mode == "none"

- name: Validate Cluster is in Kraft mode when Basic Jolokia auth
uri:
url: "{{ 'https' if kafka_controller_jolokia_ssl_enabled|bool else 'http' }}://localhost:{{kafka_controller_jolokia_port}}/jolokia/read/kafka.controller:type=KafkaController,name=ZkMigrationState"
validate_certs: false
return_content: true
force_basic_auth: true
url_username: "{{ jolokia_user }}"
url_password: "{{ jolokia_password }}"
status_code: 200
retries: "{{ metadata_migration_retries }}"
delay: 90
until: jolokia_output.json.value.Value == 3
until: ( jolokia_output.content | from_json ).value.Value == 3
register: jolokia_output
when: jolokia_auth_mode == "basic"

Expand Down

0 comments on commit dc83901

Please sign in to comment.