mirror of
https://github.com/ZwareBear/JFrog-Cloud-Installers.git
synced 2026-01-22 07:07:00 -06:00
[Ansible] JFrog Platform 7.24.3 (#153)
This commit is contained in:
committed by
GitHub
parent
16ce388773
commit
55a3842fac
@@ -0,0 +1,13 @@
|
||||
- name: Install prerequisite packages
|
||||
become: yes
|
||||
apt:
|
||||
name: ["expect", "locales"]
|
||||
state: present
|
||||
update_cache: yes
|
||||
cache_valid_time: 3600
|
||||
|
||||
- name: Ensure UTF-8 locale exists
|
||||
become: yes
|
||||
locale_gen:
|
||||
name: en_US.UTF-8
|
||||
state: present
|
||||
@@ -0,0 +1,5 @@
|
||||
- name: Install prerequisite packages
|
||||
become: yes
|
||||
yum:
|
||||
name: expect
|
||||
state: present
|
||||
@@ -1,33 +1,18 @@
|
||||
---
|
||||
- debug:
|
||||
msg: "Performing installation of Xray version : {{ xray_version }}"
|
||||
|
||||
- name: Install expect dependency
|
||||
become: yes
|
||||
yum:
|
||||
name: expect
|
||||
state: present
|
||||
when: ansible_os_family == 'RedHat'
|
||||
|
||||
- name: Install expect dependency
|
||||
become: yes
|
||||
apt:
|
||||
name: expect
|
||||
state: present
|
||||
update_cache: yes
|
||||
when: ansible_os_family == 'Debian'
|
||||
- name: Install prerequisite packages
|
||||
include_tasks: "{{ ansible_os_family }}.yml"
|
||||
|
||||
- name: Ensure group xray exist
|
||||
become: yes
|
||||
group:
|
||||
name: "{{ xray_group }}"
|
||||
gid: "{{ xray_gid }}"
|
||||
state: present
|
||||
|
||||
- name: Ensure user xray exist
|
||||
become: yes
|
||||
user:
|
||||
uid: "{{ xray_uid }}"
|
||||
name: "{{ xray_user }}"
|
||||
group: "{{ xray_group }}"
|
||||
create_home: yes
|
||||
@@ -150,10 +135,10 @@
|
||||
template:
|
||||
src: "{{ xray_system_yaml_template }}"
|
||||
dest: "{{ xray_home }}/var/etc/system.yaml"
|
||||
when:
|
||||
- xray_systemyaml is defined
|
||||
when:
|
||||
- xray_systemyaml is defined
|
||||
- xray_systemyaml|length > 0
|
||||
- xray_systemyaml_override or (not systemyaml.stat.exists)
|
||||
- xray_systemyaml_override or (not systemyaml.stat.exists)
|
||||
notify: restart xray
|
||||
|
||||
- name: Ensure permissions are correct
|
||||
@@ -167,8 +152,7 @@
|
||||
|
||||
- name: Install xray as a service
|
||||
become: yes
|
||||
shell: |
|
||||
{{ xray_archive_service_cmd }}
|
||||
shell: "{{ xray_archive_service_cmd }}"
|
||||
args:
|
||||
chdir: "{{ xray_install_script_path }}"
|
||||
creates: "{{ xray_service_file }}"
|
||||
@@ -177,10 +161,13 @@
|
||||
- name: Restart xray
|
||||
meta: flush_handlers
|
||||
|
||||
- name : Wait for xray to be fully deployed
|
||||
uri: url=http://127.0.0.1:8082/router/api/v1/system/health timeout=130
|
||||
- name: Make sure xray is up and running
|
||||
uri:
|
||||
url: http://127.0.0.1:8082/router/api/v1/system/health
|
||||
timeout: 130
|
||||
status_code: 200
|
||||
register: result
|
||||
until: result.status == 200
|
||||
until: result is succeeded
|
||||
retries: 25
|
||||
delay: 5
|
||||
when: not ansible_check_mode
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
- name: perform installation
|
||||
- name: Perform installation
|
||||
include_tasks: "install.yml"
|
||||
when:
|
||||
- xray_enabled
|
||||
- not xray_upgrade_only
|
||||
- name: perform upgrade
|
||||
|
||||
- name: Perform upgrade
|
||||
include_tasks: "upgrade.yml"
|
||||
when:
|
||||
- xray_enabled
|
||||
- xray_upgrade_only
|
||||
- xray_upgrade_only
|
||||
|
||||
@@ -1,15 +1,12 @@
|
||||
- name: Set package prefix
|
||||
set_fact:
|
||||
rhel_package_prefix: >-
|
||||
{%- if linux_distro in ['centos7','rhel7'] -%}
|
||||
{%- if linux_distro in ['centos7','redhat7'] -%}
|
||||
el7
|
||||
{%- elif linux_distro in ['centos8','rhel8'] -%}
|
||||
{%- elif linux_distro in ['centos8','redhat8'] -%}
|
||||
el8
|
||||
{%- endif -%}
|
||||
|
||||
- debug:
|
||||
msg: "rhel_package_prefix: {{ rhel_package_prefix }}"
|
||||
|
||||
- name: Find socat package
|
||||
become: yes
|
||||
find:
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
- name: Set package prefix
|
||||
set_fact:
|
||||
rhel_package_prefix: >-
|
||||
{%- if linux_distro in ['centos7','rhel7'] -%}
|
||||
{%- if linux_distro in ['centos7','redhat7'] -%}
|
||||
el7
|
||||
{%- elif linux_distro in ['centos8','rhel8'] -%}
|
||||
{%- elif linux_distro in ['centos8','redhat8'] -%}
|
||||
el8
|
||||
{%- endif -%}
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
---
|
||||
- debug:
|
||||
msg: "Performing upgrade of Xray version to {{ xray_version }}..."
|
||||
|
||||
@@ -33,7 +32,7 @@
|
||||
- name: stop xray
|
||||
become: yes
|
||||
systemd:
|
||||
name: "{{ xray_daemon }}"
|
||||
name: "{{ xray_daemon }}"
|
||||
state: stopped
|
||||
when: download_xray.changed
|
||||
|
||||
@@ -104,10 +103,10 @@
|
||||
template:
|
||||
src: "{{ xray_system_yaml_template }}"
|
||||
dest: "{{ xray_home }}/var/etc/system.yaml"
|
||||
when:
|
||||
- xray_systemyaml is defined
|
||||
when:
|
||||
- xray_systemyaml is defined
|
||||
- xray_systemyaml|length > 0
|
||||
- xray_systemyaml_override or (not systemyaml.stat.exists)
|
||||
- xray_systemyaml_override or (not systemyaml.stat.exists)
|
||||
notify: restart xray
|
||||
|
||||
- name: configure installer info
|
||||
@@ -129,10 +128,13 @@
|
||||
- name: Restart xray
|
||||
meta: flush_handlers
|
||||
|
||||
- name : wait for xray to be fully deployed
|
||||
uri: url=http://127.0.0.1:8082/router/api/v1/system/health timeout=130
|
||||
- name: Make sure xray is up and running
|
||||
uri:
|
||||
url: http://127.0.0.1:8082/router/api/v1/system/health
|
||||
timeout: 130
|
||||
status_code: 200
|
||||
register: result
|
||||
until: result.status == 200
|
||||
until: result is succeeded
|
||||
retries: 25
|
||||
delay: 5
|
||||
when: not ansible_check_mode
|
||||
|
||||
Reference in New Issue
Block a user