Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions molecule/console_access/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,6 @@
Origin: http://0.0.0.0
register: this
no_log: True
failed_when:
- this.value is true
- this.status is 200

- name: Check jolokia fine grained authentorization access
ansible.builtin.uri:
Expand Down
3 changes: 0 additions & 3 deletions molecule/default/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,6 @@
Origin: http://0.0.0.0
register: this
no_log: True
failed_when:
- this.value is true
- this.status is 200

- name: Check diverts element exists in broker.xml
community.general.xml:
Expand Down
7 changes: 2 additions & 5 deletions molecule/mask_passwords/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,17 +86,14 @@
- name: Check jolokia authenticated api call
ansible.builtin.uri:
url: 'http://0.0.0.0:8161/console/jolokia/read/org.apache.activemq.artemis:broker=!%22amq-broker!%22,component=acceptors,name=!%22artemis!%22/Started'
user: amq
password: amqbrokerpass
user: tesla
password: password
force_basic_auth: yes
status_code: 200
headers:
Origin: http://0.0.0.0
register: this
no_log: True
failed_when:
- this.value is true
- this.status is 200

- name: Read content of login.config
ansible.builtin.slurp:
Expand Down
4 changes: 2 additions & 2 deletions roles/activemq/tasks/configure_artemis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@
- "{{ activemq_options | join(' ') }}"
- "--ssl-key {{ activemq_tls_keystore_dest }}"
- "--ssl-key-password {{ activemq_tls_keystore_password }}"
when: activemq_tls_enabled and activemq_tls_keystore_path and activemq_tls_keystore_password
when: activemq_tls_enabled and activemq_tls_keystore_path | length > 0 and activemq_tls_keystore_password | length > 0
no_log: "{{ not ansible_check_mode }}"

- name: Enable TLS client authentication for web UI
Expand All @@ -160,7 +160,7 @@
- "--ssl-trust {{ activemq_tls_truststore_dest }}"
- "--ssl-trust-password {{ activemq_tls_truststore_password }}"
- "--use-client-auth"
when: activemq_tls_enabled and activemq_tls_mutual_authentication and activemq_tls_truststore_path and activemq_tls_truststore_password
when: activemq_tls_enabled and activemq_tls_mutual_authentication and activemq_tls_truststore_path | length > 0 and activemq_tls_truststore_password | length > 0
no_log: "{{ not ansible_check_mode }}"

- name: Create final broker creation options
Expand Down
1 change: 1 addition & 0 deletions roles/activemq/tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
system: true
create_home: false
register: user_mod
failed_when: false
rescue:
- name: Display failure
ansible.builtin.debug:
Expand Down
2 changes: 1 addition & 1 deletion roles/activemq/tasks/mask_password.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
- name: "Parse passwd hash for existing user: {{ item.user }}"
ansible.builtin.set_fact:
existing_user: "{{ existing_users.content | b64decode
| regex_search('\\b' + item.user + ' ?= ?ENC\\([0-9]+:([^:]+):([^)]+)\\)', '\\1', '\\2') | default([]) }}"
| regex_search('\\b' + item.user + ' ?= ?ENC\\([0-9]+:([^:]+):([^)]+)\\)', '\\1', '\\2') | default([], true) }}"
mask_pwd: ''
no_log: "{{ not ansible_check_mode }}"

Expand Down
4 changes: 2 additions & 2 deletions roles/activemq/tasks/prereqs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,15 @@
- name: Validate local custom template
ansible.builtin.assert:
that:
- lookup('ansible.builtin.template', activemq_logger_config_template)
- lookup('ansible.builtin.template', activemq_logger_config_template) | length > 0
quiet: true
fail_msg: "Template not found or not readable for logging: {{ activemq_logger_config_template }}"
success_msg: "Will use custom logging template: {{ activemq_logger_config_template }}"

- name: Validate broker custom template
ansible.builtin.assert:
that:
- lookup('ansible.builtin.template', activemq_config_override_template)
- lookup('ansible.builtin.template', activemq_config_override_template) | length > 0
quiet: true
fail_msg: "Template not found or not readable for broker.xml: {{ activemq_config_override_template }}"
success_msg: "Will use custom template: {{ activemq_config_override_template }}"
Expand Down
Loading