Merge pull request #41 from Serienmorder/master

Add offline support for install
This commit is contained in:
Jeff Fry
2020-09-24 13:58:26 -07:00
committed by GitHub
6 changed files with 59 additions and 16 deletions

View File

@@ -9,7 +9,7 @@ namespace: "jfrog"
name: "installers"
# The version of the collection. Must be compatible with semantic versioning
version: "1.0.8"
version: "1.0.9"
# The path to the Markdown (.md) readme file. This path is relative to the root of the collection
readme: "README.md"

View File

@@ -4,7 +4,7 @@
ansible_marketplace: standalone
# The version of Artifactory to install
artifactory_version: 7.6.1
artifactory_version: 7.7.3
# licenses file - specify a licenses file or specify up to 5 licenses
artifactory_license1:
@@ -29,7 +29,7 @@ artifactory_file_store_dir: /data
artifactory_flavour: pro
extra_java_opts: -server -Xms2g -Xmx14g -Xss256k -XX:+UseG1GC
artifactory_system_yaml: system.yaml.j2
artifactory_tar: https://dl.bintray.com/jfrog/artifactory-pro/org/artifactory/pro/jfrog-artifactory-pro/{{ artifactory_version }}/jfrog-artifactory-pro-{{ artifactory_version }}-linux.tar.gz
artifactory_home: "{{ jfrog_home_directory }}/artifactory"
artifactory_untar_home: "{{ jfrog_home_directory }}/artifactory-{{ artifactory_flavour }}-{{ artifactory_version }}"

View File

@@ -25,6 +25,19 @@
state: directory
become: yes
- name: Local Copy artifactory
unarchive:
src: "{{ local_artifactory_tar }}"
dest: "{{ jfrog_home_directory }}"
owner: "{{ artifactory_user }}"
group: "{{ artifactory_group }}"
creates: "{{ artifactory_untar_home }}"
become: yes
when: local_artifactory_tar is defined
register: downloadartifactory
until: downloadartifactory is succeeded
retries: 3
- name: download artifactory
unarchive:
src: "{{ artifactory_tar }}"
@@ -34,6 +47,7 @@
group: "{{ artifactory_group }}"
creates: "{{ artifactory_untar_home }}"
become: yes
when: artifactory_tar is defined
register: downloadartifactory
until: downloadartifactory is succeeded
retries: 3
@@ -67,7 +81,7 @@
- name: configure system yaml
template:
src: system.yaml.j2
src: "{{ artifactory_system_yaml }}"
dest: "{{ artifactory_home }}/var/etc/system.yaml"
become: yes
when: system_file is not defined
@@ -134,18 +148,36 @@
become: yes
when: artifactory_license_file is not defined and artifactory_is_primary == true
- name: Copy local database driver
copy:
src: "{{ db_local_location }}"
dest: "{{ artifactory_home }}/var/bootstrap/artifactory/tomcat/lib"
owner: "{{ artifactory_user }}"
group: "{{ artifactory_group }}"
when: db_local_location is defined
become: yes
- name: download database driver
get_url:
url: "{{ db_download_url }}"
dest: "{{ artifactory_home }}/var/bootstrap/artifactory/tomcat/lib"
owner: "{{ artifactory_user }}"
group: "{{ artifactory_group }}"
when: db_download_url is defined
become: yes
- name: create artifactory service
shell: "{{ artifactory_home }}/app/bin/installService.sh"
become: yes
- name: Ensure permissions are correct
file:
path: "{{ artifactory_home }}"
group: "{{ artifactory_group }}"
owner: "{{ artifactory_user }}"
recurse: yes
become: yes
- name: start and enable the primary node
service:
name: artifactory

View File

@@ -1,8 +1,19 @@
---
- name: perform dependency installation
- name: Nginx Install Block
block:
- name: install nginx
package:
name: nginx
state: present
register: package_res
retries: 5
delay: 60
become: yes
until: package_res is success
rescue:
- name: perform dependency installation
include_tasks: "{{ ansible_os_family }}.yml"
- name: install nginx
- name: install nginx
package:
name: nginx
state: present