Skip to content

Commit

Permalink
#365 Use fetch and lookup('ini') to get the version (#369)
Browse files Browse the repository at this point in the history
  • Loading branch information
dlundgren authored Mar 1, 2024
1 parent 3802799 commit 14f61ce
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,15 @@
state: directory

- name: Check artifactory version
ansible.builtin.shell: |
set -o pipefail;
grep artifactory.product.version "{{ artifactory_home }}/app/artifactory.product.version.properties" |cut -d= -f2
register: check_version_cmd
ansible.builtin.fetch:
src: "{{ artifactory_home }}/app/artifactory.product.version.properties"
dest: "/tmp/artifactory.product.version.properties"
flat: true
changed_when: false

- name: Set running_version
ansible.builtin.set_fact:
running_version: "{{ check_version_cmd.stdout }}"
running_version: "{{ lookup('ansible.builtin.ini', 'artifactory.product.version', type='properties', file='/tmp/artifactory.product.version.properties') }}"

- name: Delete artifactory app directory
become: true
Expand Down

0 comments on commit 14f61ce

Please sign in to comment.