mirror of
https://github.com/ZwareBear/JFrog-Cloud-Installers.git
synced 2026-01-21 07:06:56 -06:00
[ansible] JFrog Platform 7.19.4 (#124)
This commit is contained in:
committed by
GitHub
parent
c5478f8840
commit
5b9899995b
@@ -1,7 +1,8 @@
|
||||
---
|
||||
# defaults file for distribution
|
||||
# indicates were this collection was downlaoded from (galaxy, automation_hub, standalone)
|
||||
ansible_marketplace: standalone
|
||||
|
||||
# The version of distribution to install
|
||||
distribution_version: 2.7.1
|
||||
|
||||
# whether to enable HA
|
||||
distribution_ha_enabled: false
|
||||
@@ -21,6 +22,7 @@ distribution_home: "{{ jfrog_home_directory }}/distribution"
|
||||
distribution_install_script_path: "{{ distribution_home }}/app/bin"
|
||||
distribution_thirdparty_path: "{{ distribution_home }}/app/third-party"
|
||||
distribution_archive_service_cmd: "{{ distribution_install_script_path }}/installService.sh"
|
||||
distribution_service_file: /lib/systemd/system/distribution.service
|
||||
|
||||
#distribution users and groups
|
||||
distribution_user: distribution
|
||||
@@ -64,3 +66,6 @@ distribution_systemyaml: |-
|
||||
router:
|
||||
entrypoints:
|
||||
internalPort: 8046
|
||||
|
||||
# Note: distribution_systemyaml_override is by default false, if you want to change default distribution_systemyaml
|
||||
distribution_systemyaml_override: false
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
become: yes
|
||||
when: ansible_os_family == 'Redhat'
|
||||
|
||||
- name: Install expect dependency
|
||||
- name: Install expect dependency
|
||||
apt:
|
||||
name: expect
|
||||
state: present
|
||||
@@ -17,7 +17,7 @@
|
||||
become: yes
|
||||
when: ansible_os_family == 'Debian'
|
||||
|
||||
- name: Ensure group jfdistribution exist
|
||||
- name: Ensure group distribution exist
|
||||
become: yes
|
||||
group:
|
||||
name: "{{ distribution_group }}"
|
||||
@@ -59,7 +59,7 @@
|
||||
command: "cp -r {{ distribution_untar_home }}/. {{ distribution_home }}"
|
||||
when: not app_dir_check.stat.exists
|
||||
|
||||
- name: Create required directories
|
||||
- name: Create required directories
|
||||
become: yes
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
@@ -77,8 +77,7 @@
|
||||
become: yes
|
||||
copy:
|
||||
dest: "{{ distribution_home }}/var/etc/security/master.key"
|
||||
content: |
|
||||
{{ master_key }}
|
||||
content: "{{ master_key }}"
|
||||
owner: "{{ distribution_user }}"
|
||||
group: "{{ distribution_group }}"
|
||||
mode: 0640
|
||||
@@ -98,10 +97,10 @@
|
||||
exp_executable_cmd: "./install.sh -u {{ distribution_user }} -g {{ distribution_group }}"
|
||||
exp_dir: "{{ distribution_install_script_path }}"
|
||||
exp_scenarios: "{{ distribution_installer_scenario['main'] }}"
|
||||
args:
|
||||
args:
|
||||
apply:
|
||||
environment:
|
||||
YQ_PATH: "{{ distribution_thirdparty_path }}/yq"
|
||||
environment:
|
||||
YQ_PATH: "{{ distribution_thirdparty_path }}/yq"
|
||||
when: install_wrapper_script.stat.exists
|
||||
|
||||
- name: Configure redis config
|
||||
@@ -111,11 +110,21 @@
|
||||
dest: "{{ distribution_home }}/var/etc/redis/redis.conf"
|
||||
notify: restart distribution
|
||||
|
||||
- name: Check if systemyaml exists
|
||||
become: yes
|
||||
stat:
|
||||
path: "{{ distribution_home }}/var/etc/system.yaml"
|
||||
register: systemyaml
|
||||
|
||||
- name: Configure systemyaml
|
||||
become: yes
|
||||
template:
|
||||
src: "{{ distribution_system_yaml_template }}"
|
||||
dest: "{{ distribution_home }}/var/etc/system.yaml"
|
||||
when:
|
||||
- distribution_systemyaml is defined
|
||||
- distribution_systemyaml|length > 0
|
||||
- distribution_systemyaml_override or (not systemyaml.stat.exists)
|
||||
notify: restart distribution
|
||||
|
||||
- name: Configure installer info
|
||||
@@ -133,7 +142,6 @@
|
||||
recurse: yes
|
||||
owner: "{{ distribution_user }}"
|
||||
group: "{{ distribution_group }}"
|
||||
mode: '0755'
|
||||
|
||||
- name: Install Distribution as a service
|
||||
become: yes
|
||||
@@ -141,15 +149,25 @@
|
||||
{{ distribution_archive_service_cmd }}
|
||||
args:
|
||||
chdir: "{{ distribution_install_script_path }}"
|
||||
creates: "{{ distribution_service_file }}"
|
||||
register: check_service_status_result
|
||||
ignore_errors: yes
|
||||
|
||||
- name: Update distribution permissions
|
||||
become: yes
|
||||
file:
|
||||
path: "{{ distribution_home }}"
|
||||
state: directory
|
||||
recurse: yes
|
||||
owner: "{{ distribution_user }}"
|
||||
group: "{{ distribution_group }}"
|
||||
|
||||
- name: Restart distribution
|
||||
meta: flush_handlers
|
||||
|
||||
- name : Wait for distribution to be fully deployed
|
||||
- name : Wait for distribution to be fully deployed
|
||||
uri: url=http://127.0.0.1:8082/router/api/v1/system/health timeout=130
|
||||
register: result
|
||||
until: result.status == 200
|
||||
retries: 25
|
||||
delay: 5
|
||||
when: not ansible_check_mode
|
||||
|
||||
@@ -2,12 +2,6 @@
|
||||
- debug:
|
||||
msg: "Performing upgrade of Distribution version to {{ distribution_version }} "
|
||||
|
||||
- name: Stop distribution
|
||||
become: yes
|
||||
systemd:
|
||||
name: "{{ distribution_daemon }}"
|
||||
state: stopped
|
||||
|
||||
- name: Download distribution for upgrade
|
||||
become: yes
|
||||
unarchive:
|
||||
@@ -21,21 +15,31 @@
|
||||
until: downloaddistribution is succeeded
|
||||
retries: 3
|
||||
|
||||
- name: Stop distribution
|
||||
become: yes
|
||||
systemd:
|
||||
name: "{{ distribution_daemon }}"
|
||||
state: stopped
|
||||
when: downloaddistribution.changed
|
||||
|
||||
- name: Delete distribution app
|
||||
become: yes
|
||||
file:
|
||||
path: "{{ distribution_home }}/app"
|
||||
state: absent
|
||||
when: downloaddistribution.changed
|
||||
|
||||
- name: Copy new app to distribution app
|
||||
become: yes
|
||||
command: "cp -r {{ distribution_untar_home }}/app/. {{ distribution_home }}/app"
|
||||
when: downloaddistribution.changed
|
||||
|
||||
- name: Check if install.sh wrapper script exist
|
||||
become: yes
|
||||
stat:
|
||||
path: "{{ distribution_install_script_path }}/install.sh"
|
||||
register: install_wrapper_script
|
||||
when: downloaddistribution.changed
|
||||
|
||||
- name: Include interactive installer scripts
|
||||
include_vars: script/archive.yml
|
||||
@@ -46,11 +50,13 @@
|
||||
exp_executable_cmd: "./install.sh -u {{ distribution_user }} -g {{ distribution_group }}"
|
||||
exp_dir: "{{ distribution_install_script_path }}"
|
||||
exp_scenarios: "{{ distribution_installer_scenario['main'] }}"
|
||||
args:
|
||||
args:
|
||||
apply:
|
||||
environment:
|
||||
YQ_PATH: "{{ distribution_thirdparty_path }}/yq"
|
||||
when: install_wrapper_script.stat.exists
|
||||
environment:
|
||||
YQ_PATH: "{{ distribution_thirdparty_path }}/yq"
|
||||
when:
|
||||
- install_wrapper_script.stat.exists
|
||||
- downloaddistribution.changed
|
||||
|
||||
- name: Ensure {{ distribution_home }}/var/etc/redis exists
|
||||
become: yes
|
||||
@@ -74,14 +80,24 @@
|
||||
dest: "{{ distribution_home }}/var/etc/info/installer-info.json"
|
||||
notify: restart distribution
|
||||
|
||||
- name: Check if systemyaml exists
|
||||
become: yes
|
||||
stat:
|
||||
path: "{{ distribution_home }}/var/etc/system.yaml"
|
||||
register: systemyaml
|
||||
|
||||
- name: Configure systemyaml
|
||||
become: yes
|
||||
template:
|
||||
src: "{{ distribution_system_yaml_template }}"
|
||||
dest: "{{ distribution_home }}/var/etc/system.yaml"
|
||||
when:
|
||||
- distribution_systemyaml is defined
|
||||
- distribution_systemyaml|length > 0
|
||||
- distribution_systemyaml_override or (not systemyaml.stat.exists)
|
||||
notify: restart distribution
|
||||
|
||||
- name: Update Distribution base dir owner and group
|
||||
- name: Update distribution permissions
|
||||
become: yes
|
||||
file:
|
||||
path: "{{ distribution_home }}"
|
||||
@@ -89,23 +105,14 @@
|
||||
recurse: yes
|
||||
owner: "{{ distribution_user }}"
|
||||
group: "{{ distribution_group }}"
|
||||
mode: '0755'
|
||||
|
||||
- name: Install Distribution as a service
|
||||
become: yes
|
||||
shell: |
|
||||
{{ distribution_archive_service_cmd }}
|
||||
args:
|
||||
chdir: "{{ distribution_install_script_path }}"
|
||||
register: check_service_status_result
|
||||
ignore_errors: yes
|
||||
|
||||
- name: Restart distribution
|
||||
meta: flush_handlers
|
||||
|
||||
- name : Wait for distribution to be fully deployed
|
||||
- name : Wait for distribution to be fully deployed
|
||||
uri: url=http://127.0.0.1:8082/router/api/v1/system/health timeout=130
|
||||
register: result
|
||||
until: result.status == 200
|
||||
retries: 25
|
||||
delay: 5
|
||||
when: not ansible_check_mode
|
||||
|
||||
@@ -1,3 +1 @@
|
||||
{% if (distribution_systemyaml) and (distribution_systemyaml|length > 0) %}
|
||||
{{ distribution_systemyaml }}
|
||||
{% endif %}
|
||||
{{ distribution_systemyaml }}
|
||||
@@ -1,2 +1,6 @@
|
||||
---
|
||||
# platform collection version
|
||||
platform_collection_version: 7.19.4
|
||||
|
||||
# indicates were this collection was downlaoded from (galaxy, automation_hub, standalone)
|
||||
ansible_marketplace: galaxy
|
||||
|
||||
Reference in New Issue
Block a user