Skip to content

Commit 656c08f

Browse files
authored
Merge pull request #249 from RanabirChakraborty/AMW-413
AMW-413 Make amq collection compliant with ansible-core 2.19
2 parents 45bcbf7 + b0da690 commit 656c08f

File tree

7 files changed

+8
-16
lines changed

7 files changed

+8
-16
lines changed

molecule/console_access/verify.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,6 @@
8080
Origin: http://0.0.0.0
8181
register: this
8282
no_log: True
83-
failed_when:
84-
- this.value is true
85-
- this.status is 200
8683

8784
- name: Check jolokia fine grained authentorization access
8885
ansible.builtin.uri:

molecule/default/verify.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,6 @@
9595
Origin: http://0.0.0.0
9696
register: this
9797
no_log: True
98-
failed_when:
99-
- this.value is true
100-
- this.status is 200
10198

10299
- name: Check diverts element exists in broker.xml
103100
community.general.xml:

molecule/mask_passwords/verify.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,17 +86,14 @@
8686
- name: Check jolokia authenticated api call
8787
ansible.builtin.uri:
8888
url: 'http://0.0.0.0:8161/console/jolokia/read/org.apache.activemq.artemis:broker=!%22amq-broker!%22,component=acceptors,name=!%22artemis!%22/Started'
89-
user: amq
90-
password: amqbrokerpass
89+
user: tesla
90+
password: password
9191
force_basic_auth: yes
9292
status_code: 200
9393
headers:
9494
Origin: http://0.0.0.0
9595
register: this
9696
no_log: True
97-
failed_when:
98-
- this.value is true
99-
- this.status is 200
10097

10198
- name: Read content of login.config
10299
ansible.builtin.slurp:

roles/activemq/tasks/configure_artemis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@
150150
- "{{ activemq_options | join(' ') }}"
151151
- "--ssl-key {{ activemq_tls_keystore_dest }}"
152152
- "--ssl-key-password {{ activemq_tls_keystore_password }}"
153-
when: activemq_tls_enabled and activemq_tls_keystore_path and activemq_tls_keystore_password
153+
when: activemq_tls_enabled and activemq_tls_keystore_path | length > 0 and activemq_tls_keystore_password | length > 0
154154
no_log: "{{ not ansible_check_mode }}"
155155

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

166166
- name: Create final broker creation options

roles/activemq/tasks/install.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
system: true
2828
create_home: false
2929
register: user_mod
30+
failed_when: false
3031
rescue:
3132
- name: Display failure
3233
ansible.builtin.debug:

roles/activemq/tasks/mask_password.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
- name: "Parse passwd hash for existing user: {{ item.user }}"
99
ansible.builtin.set_fact:
1010
existing_user: "{{ existing_users.content | b64decode
11-
| regex_search('\\b' + item.user + ' ?= ?ENC\\([0-9]+:([^:]+):([^)]+)\\)', '\\1', '\\2') | default([]) }}"
11+
| regex_search('\\b' + item.user + ' ?= ?ENC\\([0-9]+:([^:]+):([^)]+)\\)', '\\1', '\\2') | default([], true) }}"
1212
mask_pwd: ''
1313
no_log: "{{ not ansible_check_mode }}"
1414

roles/activemq/tasks/prereqs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,15 +96,15 @@
9696
- name: Validate local custom template
9797
ansible.builtin.assert:
9898
that:
99-
- lookup('ansible.builtin.template', activemq_logger_config_template)
99+
- lookup('ansible.builtin.template', activemq_logger_config_template) | length > 0
100100
quiet: true
101101
fail_msg: "Template not found or not readable for logging: {{ activemq_logger_config_template }}"
102102
success_msg: "Will use custom logging template: {{ activemq_logger_config_template }}"
103103

104104
- name: Validate broker custom template
105105
ansible.builtin.assert:
106106
that:
107-
- lookup('ansible.builtin.template', activemq_config_override_template)
107+
- lookup('ansible.builtin.template', activemq_config_override_template) | length > 0
108108
quiet: true
109109
fail_msg: "Template not found or not readable for broker.xml: {{ activemq_config_override_template }}"
110110
success_msg: "Will use custom template: {{ activemq_config_override_template }}"

0 commit comments

Comments
 (0)