Added offline mode for xray. Added option to configure pg_hba.conf.

This commit is contained in:
Jeff Fry
2020-09-27 10:53:12 -07:00
111 changed files with 9069 additions and 599 deletions

View File

@@ -12,7 +12,7 @@ The artifactory role installs the Artifactory Pro software onto the host. Per th
* _db_user_: The database user to configure. eg. "artifactory"
* _db_password_: The database password to configure. "Art1fact0ry"
* _server_name_: This is the server name. eg. "artifactory.54.175.51.178.xip.io"
* _system_file_: Your own [system YAML](https://www.jfrog.com/confluence/display/JFROG/System+YAML+Configuration+File) file can be specified and used. **If specified, this file will be used rather than constructing a file from the parameters above.**
* _artifactory_system_yaml_: Your own [system YAML](https://www.jfrog.com/confluence/display/JFROG/System+YAML+Configuration+File) file can be specified and used. **If specified, this file will be used rather than constructing a file from the parameters above.**
* _binary_store_file_: Your own [binary store file](https://www.jfrog.com/confluence/display/JFROG/Configuring+the+Filestore) can be used. If specified, the default cluster-file-system will not be used.
* _artifactory_upgrade_only_: Perform an software upgrade only. Default is false.
@@ -24,6 +24,8 @@ The artifactory role installs the Artifactory Pro software onto the host. Per th
### secondary vars (vars used by the secondary Artifactory server)
* _artifactory_is_primary_: For the secondary node(s) this must be set to **false**.
Additional variables can be found in [defaults/main.yml](./defaults/main.yml).
## Example Playbook
```
---

View File

@@ -4,7 +4,7 @@
ansible_marketplace: standalone
# The version of Artifactory to install
artifactory_version: 7.6.1
artifactory_version: 7.7.8
# 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_template: 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
@@ -50,6 +64,12 @@
group: "{{ artifactory_group }}"
become: yes
- name: ensure ownership of data
file:
path: "{{ artifactory_home }}/var/data"
owner: "artifactory"
group: "artifactory"
- name: ensure etc exists
file:
path: "{{ artifactory_home }}/var/etc"
@@ -60,17 +80,17 @@
- name: use specified system yaml
copy:
src: "{{ system_file }}"
src: "{{ artifactory_system_yaml }}"
dest: "{{ artifactory_home }}/var/etc/system.yaml"
become: yes
when: system_file is defined
when: artifactory_system_yaml is defined
- name: configure system yaml
- name: configure system yaml template
template:
src: system.yaml.j2
src: "{{ artifactory_system_yaml_template }}"
dest: "{{ artifactory_home }}/var/etc/system.yaml"
become: yes
when: system_file is not defined
when: artifactory_system_yaml is not defined
- name: ensure {{ artifactory_home }}/var/etc/security/ exists
file:
@@ -134,23 +154,34 @@
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 ownership of var/data
- name: Ensure permissions are correct
file:
path: "{{ artifactory_home }}/var/data"
owner: "artifactory"
group: "artifactory"
path: "{{ artifactory_home }}"
group: "{{ artifactory_group }}"
owner: "{{ artifactory_user }}"
recurse: yes
become: yes
- name: start and enable the primary node