From c5ff5273a765232decb5624c36da41d1052bb376 Mon Sep 17 00:00:00 2001 From: Ram Mohan Rao Chukka <1331672+chukka@users.noreply.github.com> Date: Thu, 21 Dec 2023 19:52:01 +0530 Subject: [PATCH] ansible] JFrog Platform 10.16.4 release (#360) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [ansible/artifactory] JA-7492- Fixed a security issue whereby, interacting with specially c… (#356) * JA-7492- Fixed a security issue whereby, interacting with specially crafted URLs could lead to exposure of sensitive information. * Version 7.71.8 of Artifactory * Determine the running_version and compare to desired artifactory_version * compare stdout wihtout newline. changed_when: false for read operation. * [ansible] JFrog Platform 10.16.4 release --------- Co-authored-by: Bas --- .../jfrog/platform/CHANGELOG.md | 4 ++++ .../jfrog/platform/galaxy.yml | 2 +- .../roles/artifactory/defaults/main.yml | 2 +- .../roles/artifactory/tasks/upgrade.yml | 17 ++++++++++++++--- .../platform/roles/artifactory/vars/main.yml | 2 +- .../roles/distribution/defaults/main.yml | 2 +- .../platform/roles/distribution/vars/main.yml | 2 +- .../jfrog/platform/roles/insight/vars/main.yml | 2 +- .../jfrog/platform/roles/xray/defaults/main.yml | 2 +- .../jfrog/platform/roles/xray/vars/main.yml | 2 +- 10 files changed, 26 insertions(+), 11 deletions(-) diff --git a/Ansible/ansible_collections/jfrog/platform/CHANGELOG.md b/Ansible/ansible_collections/jfrog/platform/CHANGELOG.md index 7c24184a..48ae1693 100644 --- a/Ansible/ansible_collections/jfrog/platform/CHANGELOG.md +++ b/Ansible/ansible_collections/jfrog/platform/CHANGELOG.md @@ -1,6 +1,10 @@ # JFrog Platform Ansible Collection Changelog All changes to this collection will be documented in this file. +## [10.16.4] - Dec 21, 2023 +* Artifactory - Upgrade version when tar is already present [GH-356](https://github.com/jfrog/JFrog-Cloud-Installers/pull/356) +* Product Updates/fixes + ## [10.16.3] - Dec 6, 2023 * Added How to avoid IPv6 binding in Readme [GH-349](https://github.com/jfrog/JFrog-Cloud-Installers/pull/349) * Product Updates/fixes diff --git a/Ansible/ansible_collections/jfrog/platform/galaxy.yml b/Ansible/ansible_collections/jfrog/platform/galaxy.yml index 994a9b77..5b9c59e5 100644 --- a/Ansible/ansible_collections/jfrog/platform/galaxy.yml +++ b/Ansible/ansible_collections/jfrog/platform/galaxy.yml @@ -9,7 +9,7 @@ namespace: "jfrog" name: "platform" # The version of the collection. Must be compatible with semantic versioning -version: "10.16.3" +version: "10.16.4" # The path to the Markdown (.md) readme file. This path is relative to the root of the collection readme: "README.md" diff --git a/Ansible/ansible_collections/jfrog/platform/roles/artifactory/defaults/main.yml b/Ansible/ansible_collections/jfrog/platform/roles/artifactory/defaults/main.yml index 817e5acd..6fb0a90b 100644 --- a/Ansible/ansible_collections/jfrog/platform/roles/artifactory/defaults/main.yml +++ b/Ansible/ansible_collections/jfrog/platform/roles/artifactory/defaults/main.yml @@ -1,7 +1,7 @@ # Defaults file for artifactory # The version of artifactory to install -artifactory_version: 7.71.5 +artifactory_version: 7.71.9 # Set this to true when SSL is enabled (to use artifactory_nginx_ssl role), default to false (implies artifactory uses artifactory_nginx role ) artifactory_nginx_ssl_enabled: false diff --git a/Ansible/ansible_collections/jfrog/platform/roles/artifactory/tasks/upgrade.yml b/Ansible/ansible_collections/jfrog/platform/roles/artifactory/tasks/upgrade.yml index 2ff3a108..b1531fc0 100644 --- a/Ansible/ansible_collections/jfrog/platform/roles/artifactory/tasks/upgrade.yml +++ b/Ansible/ansible_collections/jfrog/platform/roles/artifactory/tasks/upgrade.yml @@ -56,17 +56,28 @@ path: "{{ jfrog_home_directory }}" 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 + changed_when: false + +- name: Set running_version + ansible.builtin.set_fact: + running_version: "{{ check_version_cmd.stdout }}" + - name: Delete artifactory app directory become: true ansible.builtin.file: path: "{{ artifactory_home }}/app" state: absent - when: (download_artifactory.changed) or (unarchived_artifactory.changed) + when: running_version != artifactory_version - name: Copy new app to artifactory app become: true ansible.builtin.command: "cp -r {{ artifactory_untar_home }}/app/. {{ artifactory_home }}/app" - when: (download_artifactory.changed) or (unarchived_artifactory.changed) + when: running_version != artifactory_version notify: Restart artifactory - name: Configure artifactory license(s) @@ -168,4 +179,4 @@ delay: 5 when: - not ansible_check_mode - - artifactory_start_service | bool + - artifactory_start_service | bool \ No newline at end of file diff --git a/Ansible/ansible_collections/jfrog/platform/roles/artifactory/vars/main.yml b/Ansible/ansible_collections/jfrog/platform/roles/artifactory/vars/main.yml index 4315efa3..bbddfb25 100644 --- a/Ansible/ansible_collections/jfrog/platform/roles/artifactory/vars/main.yml +++ b/Ansible/ansible_collections/jfrog/platform/roles/artifactory/vars/main.yml @@ -1,5 +1,5 @@ # platform collection version -platform_collection_version: 10.16.3 +platform_collection_version: 10.16.4 # indicates where this collection was downloaded from (galaxy, automation_hub, standalone) ansible_marketplace: galaxy diff --git a/Ansible/ansible_collections/jfrog/platform/roles/distribution/defaults/main.yml b/Ansible/ansible_collections/jfrog/platform/roles/distribution/defaults/main.yml index 377720f2..24e24a4a 100644 --- a/Ansible/ansible_collections/jfrog/platform/roles/distribution/defaults/main.yml +++ b/Ansible/ansible_collections/jfrog/platform/roles/distribution/defaults/main.yml @@ -1,7 +1,7 @@ # defaults file for distribution # The version of distribution to install -distribution_version: 2.20.3 +distribution_version: 2.21.3 # whether to enable HA distribution_ha_enabled: false diff --git a/Ansible/ansible_collections/jfrog/platform/roles/distribution/vars/main.yml b/Ansible/ansible_collections/jfrog/platform/roles/distribution/vars/main.yml index f9441acd..c42ffa56 100644 --- a/Ansible/ansible_collections/jfrog/platform/roles/distribution/vars/main.yml +++ b/Ansible/ansible_collections/jfrog/platform/roles/distribution/vars/main.yml @@ -1,5 +1,5 @@ # platform collection version -platform_collection_version: 10.16.3 +platform_collection_version: 10.16.4 # indicates were this collection was downlaoded from (galaxy, automation_hub, standalone) ansible_marketplace: galaxy diff --git a/Ansible/ansible_collections/jfrog/platform/roles/insight/vars/main.yml b/Ansible/ansible_collections/jfrog/platform/roles/insight/vars/main.yml index f9441acd..c42ffa56 100644 --- a/Ansible/ansible_collections/jfrog/platform/roles/insight/vars/main.yml +++ b/Ansible/ansible_collections/jfrog/platform/roles/insight/vars/main.yml @@ -1,5 +1,5 @@ # platform collection version -platform_collection_version: 10.16.3 +platform_collection_version: 10.16.4 # indicates were this collection was downlaoded from (galaxy, automation_hub, standalone) ansible_marketplace: galaxy diff --git a/Ansible/ansible_collections/jfrog/platform/roles/xray/defaults/main.yml b/Ansible/ansible_collections/jfrog/platform/roles/xray/defaults/main.yml index 2e0d5ea6..863d4426 100644 --- a/Ansible/ansible_collections/jfrog/platform/roles/xray/defaults/main.yml +++ b/Ansible/ansible_collections/jfrog/platform/roles/xray/defaults/main.yml @@ -1,7 +1,7 @@ # Defaults file for xray # The version of xray to install -xray_version: 3.86.4 +xray_version: 3.86.9 # Whether to enable HA xray_ha_enabled: false diff --git a/Ansible/ansible_collections/jfrog/platform/roles/xray/vars/main.yml b/Ansible/ansible_collections/jfrog/platform/roles/xray/vars/main.yml index f9441acd..c42ffa56 100644 --- a/Ansible/ansible_collections/jfrog/platform/roles/xray/vars/main.yml +++ b/Ansible/ansible_collections/jfrog/platform/roles/xray/vars/main.yml @@ -1,5 +1,5 @@ # platform collection version -platform_collection_version: 10.16.3 +platform_collection_version: 10.16.4 # indicates were this collection was downlaoded from (galaxy, automation_hub, standalone) ansible_marketplace: galaxy