-
Task
-
Resolution: Obsolete
-
Major
-
None
-
None
-
None
-
Undefined
How future proof is this Ansible solution?
- name: "Get the version of wildfly-common for {{ amq_version }}"
command:
argv: - awk
- "-F:"
- '/^ - wildfly-common /
{print $3"-"$5"."$4}'
- "{{ amq_install_dir }}/web/META-INF/DEPENDENCIES"
register: wildfly_common_verion
changed_when: false
become: yes
become_user: "{{ amq_user }}"
- name: "Get the version of jboss-logmanager for {{ amq_version }}"
command:
argv:
- awk
- "-F:"
- '/^ - JBoss Log Manager / {print $3"-"$5"."$4}'
- "{{ amq_install_dir }}/web/META-INF/DEPENDENCIES"
register: jboss_logmanager_version
changed_when: false
become: yes
become_user: "{{ amq_user }}"
- name: Check Existence of artemis.profile file
stat:
path: "{{ amq_broker_dir }}/etc/artemis.profile"
register: jboss_amq_profile_exists
become: yes
become_user: "{{ amq_user }}"
- name: "Replace references in artemis.profile for the new AMQ Broker version {{ amq_version }}"
replace:
path: "{{ amq_broker_dir }}/etc/artemis.profile"
regexp: "{{ item.old }}"
replace: "{{ item.new }}"
with_items: - { old: '(?P^.amq-broker-)\d\.\d\.\d(.)$', new: '\g{{ amq_version }}\2' }
- { old: 'jboss-logmanager-.*\.jar', new: '{{ jboss_logmanager_version.stdout }}' }
- { old: 'wildfly-common-.*\.jar', new: '{{ wildfly_common_verion.stdout }}' }
when: jboss_amq_profile_exists.stat.exists
become: yes
become_user: "{{ amq_user }}"
Reported by: paulwrr