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

@@ -11,9 +11,10 @@ The xray role will install Xray software onto the host. An Artifactory server an
* _db_url_: This is the database url. eg. "postgres://10.0.0.59:5432/xraydb?sslmode=disable"
* _db_user_: The database user to configure. eg. "xray"
* _db_password_: The database password to configure. "xray"
* _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.
* _xray_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.
* _xray_upgrade_only_: Perform an software upgrade only. Default is 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 xray to install
xray_version: 3.5.2
xray_version: 3.8.6
# whether to enable HA
xray_ha_enabled: true
@@ -24,4 +24,6 @@ xray_user: xray
xray_group: xray
# if this is an upgrade
xray_upgrade_only: false
xray_upgrade_only: false
xray_system_yaml_template: system.yaml.j2

View File

@@ -52,11 +52,19 @@
group: "{{ xray_group }}"
become: yes
- name: configure system yaml
template:
src: system.yaml.j2
dest: "{{ xray_home }}/var/etc/system.yaml"
- name: use specified system yaml
copy:
src: "{{ artifactory_system_yaml }}"
dest: "{{ artifactory_home }}/var/etc/system.yaml"
become: yes
when: artifactory_system_yaml is defined
- name: configure system yaml template
template:
src: "{{ artifactory_system_yaml_template }}"
dest: "{{ artifactory_home }}/var/etc/system.yaml"
become: yes
when: artifactory_system_yaml is not defined
- name: ensure {{ xray_home }}/var/etc/security/ exists
file: