[jfrog-platform] 7.25.7 release (#159)

This commit is contained in:
Ram Mohan Rao Chukka
2021-09-16 20:14:17 +05:30
committed by GitHub
parent 6997cd9efb
commit b38d10db61
46 changed files with 312 additions and 270 deletions

View File

@@ -1,11 +1,17 @@
# JFrog Platform Ansible Collection Changelog # JFrog Platform Ansible Collection Changelog
All changes to this collection will be documented in this file. All changes to this collection will be documented in this file.
## [7.25.7] - Sep 16, 2021
* Bug Fixes
## [7.24.3] - Aug 17, 2021 ## [7.24.3] - Aug 17, 2021
* Added required variables check when using `artifactory_nginx_ssl` role * Added required variables check when using `artifactory_nginx_ssl` role
* Missioncontrol's Elasticsearch to use default ES JAVA_HOME * Missioncontrol's Elasticsearch to use default ES JAVA_HOME
* Bug Fixes * Bug Fixes
## [7.23.4] - Aug 9, 2021
* Missioncontrol's Elasticsearch to use default ES JAVA_HOME
## [7.23.3] - Aug 5, 2021 ## [7.23.3] - Aug 5, 2021
* Missioncontrol's Elasticsearch to use new JAVA_HOME path * Missioncontrol's Elasticsearch to use new JAVA_HOME path
* Missioncontrol's Elasticsearch searchguard plugin to use by default `anonymous_auth_enabled: true` * Missioncontrol's Elasticsearch searchguard plugin to use by default `anonymous_auth_enabled: true`

View File

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

View File

@@ -5,9 +5,7 @@ master_key: ee69d96880726d3abf6b42b97d2ae589111ea95c2a8bd5876ec5cd9e8ee34f86
join_key: 83da88eaaa08dfed5b86888fcec85f19ace0c3ff8747bcefcec2c9769ad4043d join_key: 83da88eaaa08dfed5b86888fcec85f19ace0c3ff8747bcefcec2c9769ad4043d
jfrog_url: >- jfrog_url: >-
{%- for host in groups['artifactory_servers'] -%} "http://{{ hostvars[groups['artifactory_servers'][0]]['ansible_host'] }}:8082"
"http://{{ hostvars[host]['ansible_host'] }}:8082"
{%- endfor -%}
## Products enabled ## Products enabled
artifactory_enabled: true artifactory_enabled: true
@@ -23,9 +21,7 @@ artifactory_db_name: artifactory
artifactory_db_user: artifactory artifactory_db_user: artifactory
artifactory_db_password: password artifactory_db_password: password
artifactory_db_url: >- artifactory_db_url: >-
{%- for item in groups['postgres_servers'] -%} jdbc:postgresql://{{ hostvars[groups['postgres_servers'][0]]['ansible_host'] }}:5432/{{ artifactory_db_name }}
jdbc:postgresql://{{ hostvars[item]['ansible_host'] }}:5432/{{ artifactory_db_name }}
{%- endfor -%}
# Xray DB details # Xray DB details
xray_db_type: postgresql xray_db_type: postgresql
@@ -34,9 +30,7 @@ xray_db_name: xray
xray_db_user: xray xray_db_user: xray
xray_db_password: password xray_db_password: password
xray_db_url: >- xray_db_url: >-
{%- for item in groups['postgres_servers'] -%} postgres://{{ hostvars[groups['postgres_servers'][0]]['ansible_host'] }}:5432/{{ xray_db_name }}?sslmode=disable
postgres://{{ hostvars[item]['ansible_host'] }}:5432/{{ xray_db_name }}?sslmode=disable
{%- endfor -%}
# Distribution DB details # Distribution DB details
distribution_db_type: postgresql distribution_db_type: postgresql
@@ -45,9 +39,7 @@ distribution_db_name: distribution
distribution_db_user: distribution distribution_db_user: distribution
distribution_db_password: password distribution_db_password: password
distribution_db_url: >- distribution_db_url: >-
{%- for item in groups['postgres_servers'] -%} jdbc:postgresql://{{ hostvars[groups['postgres_servers'][0]]['ansible_host'] }}:5432/{{ distribution_db_name }}?sslmode=disable
jdbc:postgresql://{{ hostvars[item]['ansible_host'] }}:5432/{{ distribution_db_name }}?sslmode=disable
{%- endfor -%}
# MissionControl DB details # MissionControl DB details
mc_db_type: postgresql mc_db_type: postgresql
@@ -56,9 +48,7 @@ mc_db_name: mc
mc_db_user: mc mc_db_user: mc
mc_db_password: password mc_db_password: password
mc_db_url: >- mc_db_url: >-
{%- for item in groups['postgres_servers'] -%} jdbc:postgresql://{{ hostvars[groups['postgres_servers'][0]]['ansible_host'] }}:5432/{{ mc_db_name }}?sslmode=disable
jdbc:postgresql://{{ hostvars[item]['ansible_host'] }}:5432/{{ mc_db_name }}?sslmode=disable
{%- endfor -%}
# Postgresql users and databases/schemas # Postgresql users and databases/schemas
db_users: db_users:

View File

@@ -1,7 +1,7 @@
# defaults file for artifactory # defaults file for artifactory
# The version of artifactory to install # The version of artifactory to install
artifactory_version: 7.24.3 artifactory_version: 7.25.7
# Set this to true when SSL is enabled (to use artifactory_nginx_ssl role), default to false (implies artifactory uses artifactory_nginx role ) # Set this to true when SSL is enabled (to use artifactory_nginx_ssl role), default to false (implies artifactory uses artifactory_nginx role )
artifactory_nginx_ssl_enabled: false artifactory_nginx_ssl_enabled: false
@@ -13,7 +13,7 @@ artifactory_nginx_enabled: true
# artifactory_single_license: # artifactory_single_license:
# Provide individual (HA) licenses file separated by new line and 2-space indentation and set artifactory_ha_enabled: true. # Provide individual (HA) licenses file separated by new line and 2-space indentation and set artifactory_ha_enabled: true.
# Example: # Example: Replace <license_1> , <license_2> , <license_3> with original licenses
# artifactory_licenses: |- # artifactory_licenses: |-
# <license_1> # <license_1>
@@ -25,7 +25,7 @@ artifactory_nginx_enabled: true
artifactory_ha_enabled: false artifactory_ha_enabled: false
# By default, all nodes are primary (CNHA) - https://www.jfrog.com/confluence/display/JFROG/High+Availability#HighAvailability-Cloud-NativeHighAvailability # By default, all nodes are primary (CNHA) - https://www.jfrog.com/confluence/display/JFROG/High+Availability#HighAvailability-Cloud-NativeHighAvailability
artifactory_taskAffinity: any artifactory_taskaffinity: any
# The location where Artifactory should install # The location where Artifactory should install
jfrog_home_directory: /opt/jfrog jfrog_home_directory: /opt/jfrog
@@ -80,7 +80,7 @@ artifactory_systemyaml: |-
node: node:
id: {{ ansible_hostname }} id: {{ ansible_hostname }}
ip: {{ ansible_host }} ip: {{ ansible_host }}
taskAffinity: {{ artifactory_taskAffinity }} taskAffinity: {{ artifactory_taskaffinity }}
haEnabled: {{ artifactory_ha_enabled }} haEnabled: {{ artifactory_ha_enabled }}
database: database:
type: "{{ artifactory_db_type }}" type: "{{ artifactory_db_type }}"

View File

@@ -5,3 +5,9 @@
systemd: systemd:
name: "{{ artifactory_daemon }}" name: "{{ artifactory_daemon }}"
state: restarted state: restarted
- name: stop artifactory
become: yes
systemd:
name: "{{ artifactory_daemon }}"
state: stopped

View File

@@ -1,16 +1,27 @@
---
dependencies: []
galaxy_info: galaxy_info:
author: "JFrog Maintainers Team <installers@jfrog.com>" author: "JFrog Maintainers Team <installers@jfrog.com>"
description: "The artifactory role installs the Artifactory Pro software onto the host." description: "The artifactory role installs the Artifactory Pro software onto the host."
company: JFrog company: JFrog
issue_tracker_url: "https://github.com/jfrog/JFrog-Cloud-Installers/issues" issue_tracker_url: "https://github.com/jfrog/JFrog-Cloud-Installers/issues"
license: license (Apache-2.0) license: license (Apache-2.0)
min_ansible_version: 2.9 min_ansible_version: 2.9
platforms:
- name: EL
versions:
- 7
- 8
- name: Ubuntu
versions:
- xenial
- bionic
- focal
- name: Debian
versions:
- stretch
- buster
galaxy_tags: galaxy_tags:
- artifactory - artifactory
- jfrog - jfrog
dependencies: []

View File

@@ -1,6 +1,3 @@
- debug:
msg: "Performing installation of Artifactory version : {{ artifactory_version }} "
- name: Install prerequisite packages - name: Install prerequisite packages
include_tasks: "{{ ansible_os_family }}.yml" include_tasks: "{{ ansible_os_family }}.yml"
@@ -70,7 +67,10 @@
- name: Copy untar directory to artifactory home - name: Copy untar directory to artifactory home
become: yes become: yes
command: "cp -r {{ artifactory_untar_home }}/. {{ artifactory_home }}" copy:
src: "{{ artifactory_untar_home }}/"
dest: "{{ artifactory_home }}"
remote_src: yes
when: not app_dir_check.stat.exists when: not app_dir_check.stat.exists
- name: Create required directories - name: Create required directories
@@ -87,17 +87,18 @@
- "{{ artifactory_home }}/var/etc/security/" - "{{ artifactory_home }}/var/etc/security/"
- "{{ artifactory_home }}/var/etc/artifactory/info/" - "{{ artifactory_home }}/var/etc/artifactory/info/"
- name: Check if systemyaml exists - name: Check if system.yaml exists
become: yes become: yes
stat: stat:
path: "{{ artifactory_home }}/var/etc/system.yaml" path: "{{ artifactory_home }}/var/etc/system.yaml"
register: systemyaml register: systemyaml
- name: Configure systemyaml - name: Configure system.yaml
become: yes become: yes
template: template:
src: "{{ artifactory_system_yaml_template }}" src: "{{ artifactory_system_yaml_template }}"
dest: "{{ artifactory_home }}/var/etc/system.yaml" dest: "{{ artifactory_home }}/var/etc/system.yaml"
mode: 0644
when: when:
- artifactory_systemyaml is defined - artifactory_systemyaml is defined
- artifactory_systemyaml|length > 0 - artifactory_systemyaml|length > 0
@@ -118,6 +119,7 @@
template: template:
src: installer-info.json.j2 src: installer-info.json.j2
dest: "{{ artifactory_home }}/var/etc/artifactory/info/installer-info.json" dest: "{{ artifactory_home }}/var/etc/artifactory/info/installer-info.json"
mode: 0644
notify: restart artifactory notify: restart artifactory
- name: Configure binary store - name: Configure binary store
@@ -125,6 +127,7 @@
template: template:
src: binarystore.xml.j2 src: binarystore.xml.j2
dest: "{{ artifactory_home }}/var/etc/artifactory/binarystore.xml" dest: "{{ artifactory_home }}/var/etc/artifactory/binarystore.xml"
mode: 0644
when: when:
- artifactory_binarystore is defined - artifactory_binarystore is defined
- artifactory_binarystore | length > 0 - artifactory_binarystore | length > 0
@@ -135,6 +138,7 @@
template: template:
src: artifactory.lic.j2 src: artifactory.lic.j2
dest: "{{ artifactory_home }}/var/etc/artifactory/artifactory.lic" dest: "{{ artifactory_home }}/var/etc/artifactory/artifactory.lic"
mode: 0644
when: when:
- artifactory_single_license is defined - artifactory_single_license is defined
- artifactory_single_license|length > 0 - artifactory_single_license|length > 0
@@ -145,6 +149,7 @@
template: template:
src: artifactory.cluster.license.j2 src: artifactory.cluster.license.j2
dest: "{{ artifactory_home }}/var/etc/artifactory/artifactory.cluster.license" dest: "{{ artifactory_home }}/var/etc/artifactory/artifactory.cluster.license"
mode: 0644
when: when:
- artifactory_licenses is defined - artifactory_licenses is defined
- artifactory_licenses|length > 0 - artifactory_licenses|length > 0
@@ -170,7 +175,7 @@
- name: Create artifactory service - name: Create artifactory service
become: yes become: yes
shell: "{{ artifactory_home }}/app/bin/installService.sh" command: "{{ artifactory_home }}/app/bin/installService.sh"
args: args:
creates: "{{ artifactory_service_file }}" creates: "{{ artifactory_service_file }}"

View File

@@ -1,6 +1,4 @@
- debug: ---
msg: "Performing upgrade of Artifactory version to : {{ artifactory_version }} "
- name: Check if artifactory tar already exists - name: Check if artifactory tar already exists
become: yes become: yes
stat: stat:
@@ -29,12 +27,8 @@
creates: "{{ artifactory_untar_home }}" creates: "{{ artifactory_untar_home }}"
when: download_artifactory is succeeded when: download_artifactory is succeeded
- name: Stop artifactory - name: stop artifactory
become: yes meta: flush_handlers
systemd:
name: "{{ artifactory_daemon }}"
state: stopped
when: download_artifactory.changed
- name: Ensure jfrog_home_directory exists - name: Ensure jfrog_home_directory exists
become: yes become: yes
@@ -59,6 +53,7 @@
template: template:
src: artifactory.lic.j2 src: artifactory.lic.j2
dest: "{{ artifactory_home }}/var/etc/artifactory/artifactory.lic" dest: "{{ artifactory_home }}/var/etc/artifactory/artifactory.lic"
mode: 0644
when: when:
- artifactory_single_license is defined - artifactory_single_license is defined
- artifactory_single_license|length > 0 - artifactory_single_license|length > 0
@@ -69,6 +64,7 @@
template: template:
src: artifactory.cluster.license.j2 src: artifactory.cluster.license.j2
dest: "{{ artifactory_home }}/var/etc/artifactory/artifactory.cluster.license" dest: "{{ artifactory_home }}/var/etc/artifactory/artifactory.cluster.license"
mode: 0644
when: when:
- artifactory_licenses is defined - artifactory_licenses is defined
- artifactory_licenses | length > 0 - artifactory_licenses | length > 0
@@ -97,6 +93,7 @@
template: template:
src: installer-info.json.j2 src: installer-info.json.j2
dest: "{{ artifactory_home }}/var/etc/artifactory/info/installer-info.json" dest: "{{ artifactory_home }}/var/etc/artifactory/info/installer-info.json"
mode: 0644
notify: restart artifactory notify: restart artifactory
- name: Configure binary store - name: Configure binary store
@@ -104,6 +101,7 @@
template: template:
src: binarystore.xml.j2 src: binarystore.xml.j2
dest: "{{ artifactory_home }}/var/etc/artifactory/binarystore.xml" dest: "{{ artifactory_home }}/var/etc/artifactory/binarystore.xml"
mode: 0644
when: when:
- artifactory_binarystore is defined - artifactory_binarystore is defined
- artifactory_binarystore|length > 0 - artifactory_binarystore|length > 0
@@ -120,6 +118,7 @@
template: template:
src: "{{ artifactory_system_yaml_template }}" src: "{{ artifactory_system_yaml_template }}"
dest: "{{ artifactory_home }}/var/etc/system.yaml" dest: "{{ artifactory_home }}/var/etc/system.yaml"
mode: 0644
when: when:
- artifactory_systemyaml is defined - artifactory_systemyaml is defined
- artifactory_systemyaml|length > 0 - artifactory_systemyaml|length > 0

View File

@@ -1,5 +1,5 @@
# platform collection version # platform collection version
platform_collection_version: 7.24.3 platform_collection_version: 7.25.7
# indicates where this collection was downloaded from (galaxy, automation_hub, standalone) # indicates where this collection was downloaded from (galaxy, automation_hub, standalone)
ansible_marketplace: galaxy ansible_marketplace: galaxy

View File

@@ -1,16 +1,27 @@
---
dependencies: []
galaxy_info: galaxy_info:
author: "JFrog Maintainers Team <installers@jfrog.com>" author: "JFrog Maintainers Team <installers@jfrog.com>"
description: "This role installs NGINX for artifactory. This role is automatically called by the artifactory role and isn't intended to be used separately." description: "This role installs NGINX for artifactory. This role is automatically called by the artifactory role and isn't intended to be used separately."
company: JFrog company: JFrog
issue_tracker_url: "https://github.com/jfrog/JFrog-Cloud-Installers/issues" issue_tracker_url: "https://github.com/jfrog/JFrog-Cloud-Installers/issues"
license: license (Apache-2.0) license: license (Apache-2.0)
min_ansible_version: 2.9 min_ansible_version: 2.9
platforms:
- name: EL
versions:
- 7
- 8
- name: Ubuntu
versions:
- xenial
- bionic
- focal
- name: Debian
versions:
- stretch
- buster
galaxy_tags: galaxy_tags:
- artifactory - artifactory
- jfrog - jfrog
dependencies: []

View File

@@ -1,16 +1,27 @@
---
dependencies: []
galaxy_info: galaxy_info:
author: "JFrog Maintainers Team <installers@jfrog.com>" author: "JFrog Maintainers Team <installers@jfrog.com>"
description: "The artifactory_nginx_ssl role installs and configures nginx for SSL." description: "The artifactory_nginx_ssl role installs and configures nginx for SSL."
company: JFrog company: JFrog
issue_tracker_url: "https://github.com/jfrog/JFrog-Cloud-Installers/issues" issue_tracker_url: "https://github.com/jfrog/JFrog-Cloud-Installers/issues"
license: license (Apache-2.0) license: license (Apache-2.0)
min_ansible_version: 2.9 min_ansible_version: 2.9
platforms:
- name: EL
versions:
- 7
- 8
- name: Ubuntu
versions:
- xenial
- bionic
- focal
- name: Debian
versions:
- stretch
- buster
galaxy_tags: galaxy_tags:
- artifactory - artifactory
- jfrog - jfrog
dependencies: []

View File

@@ -1,10 +1,10 @@
- name: "Check required variables" - name: "Check required variables"
fail: msg="Variable '{{ item }}' is not defined" fail: msg="Variable '{{ item }}' is not defined"
when: item not in vars when: item not in vars
with_items: loop:
- certificate - certificate
- certificate_key - certificate_key
- server_name - server_name
- name: Install prerequisite packages - name: Install prerequisite packages
include_tasks: "{{ ansible_os_family }}.yml" include_tasks: "{{ ansible_os_family }}.yml"
@@ -26,7 +26,7 @@
dest: /etc/nginx/nginx.conf dest: /etc/nginx/nginx.conf
owner: root owner: root
group: root group: root
mode: '0755' mode: 0755
- name: Configure redirect nginx conf - name: Configure redirect nginx conf
become: yes become: yes
@@ -35,7 +35,7 @@
dest: /etc/nginx/conf.d/redirect_http_to_https.conf dest: /etc/nginx/conf.d/redirect_http_to_https.conf
owner: root owner: root
group: root group: root
mode: '0755' mode: 0755
when: redirect_http_to_https_enabled | bool when: redirect_http_to_https_enabled | bool
notify: restart nginx notify: restart nginx
@@ -46,7 +46,7 @@
dest: /etc/nginx/conf.d/artifactory.conf dest: /etc/nginx/conf.d/artifactory.conf
owner: root owner: root
group: root group: root
mode: '0755' mode: 0755
notify: restart nginx notify: restart nginx
- name: Ensure nginx dir exists - name: Ensure nginx dir exists
@@ -54,12 +54,14 @@
file: file:
path: "/var/opt/jfrog/nginx/ssl" path: "/var/opt/jfrog/nginx/ssl"
state: directory state: directory
mode: 0644
- name: Configure certificate - name: Configure certificate
become: yes become: yes
template: template:
src: certificate.pem.j2 src: certificate.pem.j2
dest: "/var/opt/jfrog/nginx/ssl/cert.pem" dest: "/var/opt/jfrog/nginx/ssl/cert.pem"
mode: 0644
notify: restart nginx notify: restart nginx
- name: Ensure pki exists - name: Ensure pki exists
@@ -67,13 +69,15 @@
file: file:
path: "/etc/pki/tls" path: "/etc/pki/tls"
state: directory state: directory
mode: 0644
- name: Configure key - name: Configure key
become: yes become: yes
template: template:
src: certificate.key.j2 src: certificate.key.j2
dest: "/etc/pki/tls/cert.key" dest: "/etc/pki/tls/cert.key"
mode: 0644
notify: restart nginx notify: restart nginx
- name: Restart nginx - name: restart nginx
meta: flush_handlers meta: flush_handlers

View File

@@ -1,7 +1,7 @@
# defaults file for distribution # defaults file for distribution
# The version of distribution to install # The version of distribution to install
distribution_version: 2.9.0 distribution_version: 2.9.2
# whether to enable HA # whether to enable HA
distribution_ha_enabled: false distribution_ha_enabled: false

View File

@@ -5,3 +5,9 @@
systemd: systemd:
name: "{{ distribution_daemon }}" name: "{{ distribution_daemon }}"
state: restarted state: restarted
- name: stop distribution
become: yes
systemd:
name: "{{ distribution_daemon }}"
state: stopped

View File

@@ -1,16 +1,27 @@
---
dependencies: []
galaxy_info: galaxy_info:
author: "JFrog Maintainers Team <installers@jfrog.com>" author: "JFrog Maintainers Team <installers@jfrog.com>"
description: "The distribution role will install distribution software onto the host. An Artifactory server and Postgress database is required." description: "The distribution role will install distribution software onto the host. An Artifactory server and Postgress database is required."
company: JFrog company: JFrog
issue_tracker_url: "https://github.com/jfrog/JFrog-Cloud-Installers/issues" issue_tracker_url: "https://github.com/jfrog/JFrog-Cloud-Installers/issues"
license: license (Apache-2.0) license: license (Apache-2.0)
min_ansible_version: 2.9 min_ansible_version: 2.9
platforms:
- name: EL
versions:
- 7
- 8
- name: Ubuntu
versions:
- xenial
- bionic
- focal
- name: Debian
versions:
- stretch
- buster
galaxy_tags: galaxy_tags:
- distribution - distribution
- jfrog - jfrog
dependencies: []

View File

@@ -42,3 +42,4 @@
executable: /usr/bin/expect executable: /usr/bin/expect
chdir: "{{ exp_dir }}" chdir: "{{ exp_dir }}"
register: exp_result register: exp_result
changed_when: false

View File

@@ -1,6 +1,3 @@
- debug:
msg: "Performing installation of Distribution version - {{ distribution_version }}"
- name: Install prerequisite packages - name: Install prerequisite packages
include_tasks: "{{ ansible_os_family }}.yml" include_tasks: "{{ ansible_os_family }}.yml"
@@ -56,7 +53,10 @@
- name: Copy untar directory to distribution home - name: Copy untar directory to distribution home
become: yes become: yes
command: "cp -r {{ distribution_untar_home }}/. {{ distribution_home }}" copy:
src: "{{ distribution_untar_home }}/"
dest: "{{ distribution_home }}"
remote_src: yes
when: not app_dir_check.stat.exists when: not app_dir_check.stat.exists
- name: Create required directories - name: Create required directories
@@ -108,6 +108,7 @@
template: template:
src: "redis.conf.j2" src: "redis.conf.j2"
dest: "{{ distribution_home }}/var/etc/redis/redis.conf" dest: "{{ distribution_home }}/var/etc/redis/redis.conf"
mode: 0644
notify: restart distribution notify: restart distribution
- name: Check if systemyaml exists - name: Check if systemyaml exists
@@ -121,6 +122,7 @@
template: template:
src: "{{ distribution_system_yaml_template }}" src: "{{ distribution_system_yaml_template }}"
dest: "{{ distribution_home }}/var/etc/system.yaml" dest: "{{ distribution_home }}/var/etc/system.yaml"
mode: 0644
when: when:
- distribution_systemyaml is defined - distribution_systemyaml is defined
- distribution_systemyaml|length > 0 - distribution_systemyaml|length > 0
@@ -132,6 +134,7 @@
template: template:
src: installer-info.json.j2 src: installer-info.json.j2
dest: "{{ distribution_home }}/var/etc/info/installer-info.json" dest: "{{ distribution_home }}/var/etc/info/installer-info.json"
mode: 0644
notify: restart distribution notify: restart distribution
- name: Update distribution permissions - name: Update distribution permissions
@@ -145,21 +148,12 @@
- name: Install Distribution as a service - name: Install Distribution as a service
become: yes become: yes
shell: "{{ distribution_archive_service_cmd }}" command: "{{ distribution_archive_service_cmd }}"
args: args:
chdir: "{{ distribution_install_script_path }}" chdir: "{{ distribution_install_script_path }}"
creates: "{{ distribution_service_file }}" creates: "{{ distribution_service_file }}"
register: check_service_status_result register: check_service_status_result
- name: Update distribution permissions
become: yes
file:
path: "{{ distribution_home }}"
state: directory
recurse: yes
owner: "{{ distribution_user }}"
group: "{{ distribution_group }}"
- name: Restart distribution - name: Restart distribution
meta: flush_handlers meta: flush_handlers

View File

@@ -1,6 +1,3 @@
- debug:
msg: "Performing upgrade of Distribution version to {{ distribution_version }} "
- name: Check if distribution tar already exists - name: Check if distribution tar already exists
become: yes become: yes
stat: stat:
@@ -29,12 +26,8 @@
creates: "{{ distribution_untar_home }}" creates: "{{ distribution_untar_home }}"
when: download_distribution is succeeded when: download_distribution is succeeded
- name: Stop distribution - name: stop distribution
become: yes meta: flush_handlers
systemd:
name: "{{ distribution_daemon }}"
state: stopped
when: download_distribution.changed
- name: Delete distribution app - name: Delete distribution app
become: yes become: yes
@@ -48,17 +41,18 @@
command: "cp -r {{ distribution_untar_home }}/app/. {{ distribution_home }}/app" command: "cp -r {{ distribution_untar_home }}/app/. {{ distribution_home }}/app"
when: download_distribution.changed when: download_distribution.changed
- name: Check if systemyaml exists - name: Check if system.yaml exists
become: yes become: yes
stat: stat:
path: "{{ distribution_home }}/var/etc/system.yaml" path: "{{ distribution_home }}/var/etc/system.yaml"
register: systemyaml register: systemyaml
- name: Configure systemyaml - name: Configure system.yaml
become: yes become: yes
template: template:
src: "{{ distribution_system_yaml_template }}" src: "{{ distribution_system_yaml_template }}"
dest: "{{ distribution_home }}/var/etc/system.yaml" dest: "{{ distribution_home }}/var/etc/system.yaml"
mode: 0644
when: when:
- distribution_systemyaml is defined - distribution_systemyaml is defined
- distribution_systemyaml|length > 0 - distribution_systemyaml|length > 0
@@ -89,19 +83,21 @@
- install_wrapper_script.stat.exists - install_wrapper_script.stat.exists
- download_distribution.changed - download_distribution.changed
- name: Ensure {{ distribution_home }}/var/etc/redis exists - name: Ensure redis config directory exists
become: yes become: yes
file: file:
path: "{{ distribution_home }}/var/etc/redis/" path: "{{ distribution_home }}/var/etc/redis/"
state: directory state: directory
owner: "{{ distribution_user }}" owner: "{{ distribution_user }}"
group: "{{ distribution_group }}" group: "{{ distribution_group }}"
mode: 0644
- name: Configure redis config - name: Configure redis config
become: yes become: yes
template: template:
src: "redis.conf.j2" src: "redis.conf.j2"
dest: "{{ distribution_home }}/var/etc/redis/redis.conf" dest: "{{ distribution_home }}/var/etc/redis/redis.conf"
mode: 0644
notify: restart distribution notify: restart distribution
- name: Configure installer info - name: Configure installer info
@@ -109,6 +105,7 @@
template: template:
src: installer-info.json.j2 src: installer-info.json.j2
dest: "{{ distribution_home }}/var/etc/info/installer-info.json" dest: "{{ distribution_home }}/var/etc/info/installer-info.json"
mode: 0644
notify: restart distribution notify: restart distribution
- name: Update distribution permissions - name: Update distribution permissions

View File

@@ -1,5 +1,5 @@
# platform collection version # platform collection version
platform_collection_version: 7.24.3 platform_collection_version: 7.25.7
# indicates were this collection was downlaoded from (galaxy, automation_hub, standalone) # indicates were this collection was downlaoded from (galaxy, automation_hub, standalone)
ansible_marketplace: galaxy ansible_marketplace: galaxy

View File

@@ -1,7 +1,7 @@
# defaults file for mc # defaults file for mc
# The version of missioncontrol to install # The version of missioncontrol to install
missioncontrol_version: 4.7.10 missioncontrol_version: 4.7.14
# whether to enable HA # whether to enable HA
mc_ha_enabled: false mc_ha_enabled: false
@@ -44,7 +44,6 @@ mc_es_conf_base: "/etc/elasticsearch"
mc_es_user: admin mc_es_user: admin
mc_es_password: admin mc_es_password: admin
mc_es_url: "http://localhost:9200" mc_es_url: "http://localhost:9200"
mc_es_base_url: "http://localhost:9200/elasticsearch"
mc_es_transport_port: 9300 mc_es_transport_port: 9300
mc_es_home: "/usr/share/elasticsearch" mc_es_home: "/usr/share/elasticsearch"

View File

@@ -5,3 +5,9 @@
systemd: systemd:
name: "{{ mc_daemon }}" name: "{{ mc_daemon }}"
state: restarted state: restarted
- name: stop missioncontrol
become: yes
systemd:
name: "{{ mc_daemon }}"
state: stopped

View File

@@ -1,16 +1,27 @@
---
dependencies: []
galaxy_info: galaxy_info:
author: "JFrog Maintainers Team <installers@jfrog.com>" author: "JFrog Maintainers Team <installers@jfrog.com>"
description: "The missioncontrol role will install missioncontrol software onto the host. An Artifactory server and Postgress database is required." description: "The missioncontrol role will install missioncontrol software onto the host. An Artifactory server and Postgress database is required."
company: JFrog company: JFrog
issue_tracker_url: "https://github.com/jfrog/JFrog-Cloud-Installers/issues" issue_tracker_url: "https://github.com/jfrog/JFrog-Cloud-Installers/issues"
license: license (Apache-2.0) license: license (Apache-2.0)
min_ansible_version: 2.9 min_ansible_version: 2.9
platforms:
- name: EL
versions:
- 7
- 8
- name: Ubuntu
versions:
- xenial
- bionic
- focal
- name: Debian
versions:
- stretch
- buster
galaxy_tags: galaxy_tags:
- missioncontrol - missioncontrol
- jfrog - jfrog
dependencies: []

View File

@@ -42,3 +42,4 @@
executable: /usr/bin/expect executable: /usr/bin/expect
chdir: "{{ exp_dir }}" chdir: "{{ exp_dir }}"
register: exp_result register: exp_result
changed_when: false

View File

@@ -1,6 +1,3 @@
- debug:
msg: "Performing installation of missionControl version - {{ missioncontrol_version }}"
- name: Install prerequisite packages - name: Install prerequisite packages
include_tasks: "{{ ansible_os_family }}.yml" include_tasks: "{{ ansible_os_family }}.yml"
@@ -56,7 +53,10 @@
- name: Copy untar directory to mc home - name: Copy untar directory to mc home
become: yes become: yes
command: "cp -r {{ mc_untar_home }}/. {{ mc_home }}" copy:
src: "{{ mc_untar_home }}/"
dest: "{{ mc_home }}"
remote_src: yes
when: not app_dir_check.stat.exists when: not app_dir_check.stat.exists
- name: Create required directories - name: Create required directories
@@ -140,7 +140,7 @@
- name: Install mc as a service - name: Install mc as a service
become: yes become: yes
shell: "{{ mc_archive_service_cmd }}" command: "{{ mc_archive_service_cmd }}"
args: args:
chdir: "{{ mc_install_script_path }}" chdir: "{{ mc_install_script_path }}"
creates: "{{ mc_service_file }}" creates: "{{ mc_service_file }}"

View File

@@ -19,7 +19,6 @@
file: file:
path: "{{ item }}" path: "{{ item }}"
state: directory state: directory
mode: 0755
recurse: yes recurse: yes
owner: elasticsearch owner: elasticsearch
group: elasticsearch group: elasticsearch
@@ -67,7 +66,7 @@
mc_elasticsearch_package: "{{ check_elasticsearch_package_result.files[0].path }}" mc_elasticsearch_package: "{{ check_elasticsearch_package_result.files[0].path }}"
when: check_elasticsearch_package_result.matched > 0 when: check_elasticsearch_package_result.matched > 0
- name: Ensure /usr/share/elasticsearch exists - name: Ensure elasticsearch home exists
become: yes become: yes
file: file:
path: "{{ mc_es_home }}" path: "{{ mc_es_home }}"
@@ -92,7 +91,10 @@
- name: Copy elasticsearch config files to ES_PATH_CONF dir - name: Copy elasticsearch config files to ES_PATH_CONF dir
become: yes become: yes
command: "cp -r {{ mc_es_home }}/config/. {{ mc_es_conf_base }}/" copy:
src: "{{ mc_es_home }}/config/"
dest: "{{ mc_es_conf_base }}"
remote_src: yes
when: unarchive_result.changed when: unarchive_result.changed
- name: Remove elasticsearch config dir - name: Remove elasticsearch config dir
@@ -110,6 +112,7 @@
dest: "{{ mc_es_conf_base }}/elasticsearch.yml" dest: "{{ mc_es_conf_base }}/elasticsearch.yml"
owner: elasticsearch owner: elasticsearch
group: elasticsearch group: elasticsearch
mode: 0644
when: unarchive_result.extract_results.rc | default(128) == 0 when: unarchive_result.extract_results.rc | default(128) == 0
- name: Generate elasticsearch.yml template file - name: Generate elasticsearch.yml template file
@@ -119,6 +122,7 @@
dest: "{{ mc_es_conf_base }}/elasticsearch.yml" dest: "{{ mc_es_conf_base }}/elasticsearch.yml"
owner: elasticsearch owner: elasticsearch
group: elasticsearch group: elasticsearch
mode: 0644
when: unarchive_result.extract_results.rc | default(128) == 0 when: unarchive_result.extract_results.rc | default(128) == 0
- name: Create empty unicast_hosts.txt file - name: Create empty unicast_hosts.txt file
@@ -126,9 +130,9 @@
file: file:
path: "{{ mc_es_conf_base }}/unicast_hosts.txt" path: "{{ mc_es_conf_base }}/unicast_hosts.txt"
state: touch state: touch
mode: 0664
owner: elasticsearch owner: elasticsearch
group: elasticsearch group: elasticsearch
mode: 0664
- name: Setup searchguard plugin - name: Setup searchguard plugin
import_tasks: setup-searchguard.yml import_tasks: setup-searchguard.yml
@@ -138,7 +142,6 @@
file: file:
path: "{{ item }}" path: "{{ item }}"
state: directory state: directory
mode: 0755
recurse: yes recurse: yes
owner: elasticsearch owner: elasticsearch
group: elasticsearch group: elasticsearch
@@ -150,7 +153,7 @@
- name: Start elasticsearch - name: Start elasticsearch
become: yes become: yes
shell: "su -c '{{ mc_es_script_path }}/elasticsearch -d' elasticsearch" command: "su -c '{{ mc_es_script_path }}/elasticsearch -d' elasticsearch"
environment: environment:
ES_JAVA_HOME: "{{ mc_es_java_home }}" ES_JAVA_HOME: "{{ mc_es_java_home }}"
ES_PATH_CONF: "{{ mc_es_conf_base }}/" ES_PATH_CONF: "{{ mc_es_conf_base }}/"

View File

@@ -8,6 +8,7 @@
echo "$(ps -ef | grep -v grep | grep ${curr_ps_id})" echo "$(ps -ef | grep -v grep | grep ${curr_ps_id})"
kill -9 ${curr_ps_id} kill -9 ${curr_ps_id}
done done
changed_when: false
- name: Find searchguard bundle for removal - name: Find searchguard bundle for removal
become: yes become: yes
@@ -41,9 +42,9 @@
file: file:
path: "{{ mc_es_home }}" path: "{{ mc_es_home }}"
state: directory state: directory
mode: 0755
owner: elasticsearch owner: elasticsearch
group: elasticsearch group: elasticsearch
mode: 0755
- name: Find elasticsearch package - name: Find elasticsearch package
become: yes become: yes
@@ -61,7 +62,6 @@
- name: Extract elasticsearch package - name: Extract elasticsearch package
become: yes become: yes
ignore_errors: yes
unarchive: unarchive:
src: "{{ mc_elasticsearch_package }}" src: "{{ mc_elasticsearch_package }}"
dest: "{{ mc_es_home }}" dest: "{{ mc_es_home }}"
@@ -83,6 +83,7 @@
dest: "{{ mc_es_conf_base }}/elasticsearch.yml" dest: "{{ mc_es_conf_base }}/elasticsearch.yml"
owner: elasticsearch owner: elasticsearch
group: elasticsearch group: elasticsearch
mode: 0644
when: unarchive_result.extract_results.rc | default(128) == 0 when: unarchive_result.extract_results.rc | default(128) == 0
- name: Create empty unicast_hosts.txt file - name: Create empty unicast_hosts.txt file
@@ -90,16 +91,16 @@
file: file:
path: "{{ mc_es_conf_base }}/unicast_hosts.txt" path: "{{ mc_es_conf_base }}/unicast_hosts.txt"
state: touch state: touch
mode: 0644
owner: elasticsearch owner: elasticsearch
group: elasticsearch group: elasticsearch
mode: 0644
- name: Upgrade searchguard plugin - name: Upgrade searchguard plugin
import_tasks: upgrade-searchguard.yml import_tasks: upgrade-searchguard.yml
- name: Start elasticsearch - name: Start elasticsearch
become: yes become: yes
shell: "su -c '{{ mc_es_script_path }}/elasticsearch -d' elasticsearch" command: "su -c '{{ mc_es_script_path }}/elasticsearch -d' elasticsearch"
environment: environment:
ES_JAVA_HOME: "{{ mc_es_java_home }}" ES_JAVA_HOME: "{{ mc_es_java_home }}"
ES_PATH_CONF: "{{ mc_es_conf_base }}/" ES_PATH_CONF: "{{ mc_es_conf_base }}/"

View File

@@ -1,6 +1,4 @@
- debug: ---
msg: "Performing Upgrade of missionControl version - {{ missioncontrol_version }}"
- name: Check if mc tar exists - name: Check if mc tar exists
become: yes become: yes
stat: stat:
@@ -29,12 +27,8 @@
creates: "{{ mc_untar_home }}" creates: "{{ mc_untar_home }}"
when: download_mc is succeeded when: download_mc is succeeded
- name: Stop mc service - name: stop missioncontrol
become: yes meta: flush_handlers
systemd:
name: "{{ mc_daemon }}"
state: stopped
when: download_mc.changed
- name: Delete current app folder - name: Delete current app folder
become: yes become: yes
@@ -105,6 +99,7 @@
template: template:
src: installer-info.json.j2 src: installer-info.json.j2
dest: "{{ mc_home }}/var/etc/info/installer-info.json" dest: "{{ mc_home }}/var/etc/info/installer-info.json"
mode: 0644
notify: restart missioncontrol notify: restart missioncontrol
- name: Update correct permissions - name: Update correct permissions

View File

@@ -1,5 +1,5 @@
# platform collection version # platform collection version
platform_collection_version: 7.24.3 platform_collection_version: 7.25.7
# indicates were this collection was downlaoded from (galaxy, automation_hub, standalone) # indicates were this collection was downlaoded from (galaxy, automation_hub, standalone)
ansible_marketplace: galaxy ansible_marketplace: galaxy

View File

@@ -1,4 +1,3 @@
---
# Default version of Postgres server to install. # Default version of Postgres server to install.
postgres_version: 13 postgres_version: 13
@@ -93,3 +92,14 @@ postgres_allowed_hosts:
address: "0.0.0.0/0", address: "0.0.0.0/0",
method: "trust", method: "trust",
} }
# PostgreSQL misc settings
postgresql_bin_path: "{{ default_postgresql_bin_path }}"
postgresql_config_path: "{{ default_postgresql_config_path }}"
postgresql_data_dir: "{{ default_postgresql_data_dir }}"
postgresql_daemon: "{{ default_postgresql_daemon }}"
postgresql_external_pid_file: "{{ default_postgresql_external_pid_file }}"
postgres_apt_key_id: "{{ default_postgres_apt_key_id }}"
postgres_apt_key_url: "{{ default_postgres_apt_key_url }}"
postgres_apt_repository_repo: "{{ default_postgres_apt_repository_repo }}"

View File

@@ -1,16 +1,27 @@
---
dependencies: []
galaxy_info: galaxy_info:
author: "JFrog Maintainers Team <installers@jfrog.com>" author: "JFrog Maintainers Team <installers@jfrog.com>"
description: "The postgres role will install Postgresql software and configure a database and user to support an Artifactory or Xray server." description: "The postgres role will install Postgresql software and configure a database and user to support an Artifactory or Xray server."
company: JFrog company: JFrog
issue_tracker_url: "https://github.com/jfrog/JFrog-Cloud-Installers/issues" issue_tracker_url: "https://github.com/jfrog/JFrog-Cloud-Installers/issues"
license: license (Apache-2.0) license: license (Apache-2.0)
min_ansible_version: 2.9 min_ansible_version: 2.9
platforms:
- name: EL
versions:
- 7
- 8
- name: Ubuntu
versions:
- xenial
- bionic
- focal
- name: Debian
versions:
- stretch
- buster
galaxy_tags: galaxy_tags:
- postgres - postgres
- jfrog - jfrog
dependencies: []

View File

@@ -47,6 +47,7 @@
line: "{{ item }}" line: "{{ item }}"
state: present state: present
create: yes create: yes
mode: 0644
loop: loop:
- LANG=en_us.UTF-8 - LANG=en_us.UTF-8
- LANGUAGE=en_us.UTF-8 - LANGUAGE=en_us.UTF-8

View File

@@ -120,6 +120,3 @@
privs: ALL privs: ALL
type: database type: database
loop: "{{ dbs | default([]) }}" loop: "{{ dbs | default([]) }}"
- debug:
msg: "Restarted postgres systemd {{ postgresql_daemon }}"

View File

@@ -9,10 +9,10 @@
local all all peer local all all peer
host all all 127.0.0.1/32 md5 host all all 127.0.0.1/32 md5
host all all ::1/128 md5 host all all ::1/128 md5
## remote connections IPv4
{% if postgres_allowed_hosts and postgres_allowed_hosts is iterable %}
{% for host in postgres_allowed_hosts %}
{{ host.type | default('host') }} {{ host.database | default('all') }} {{ host.user | default('all') }} {{ host.address | default('0.0.0.0/0') }} {{ item.auth | default('trust') }}
{% endfor %}
{% endif %}
## remote connections IPv4
{% if postgres_allowed_hosts and postgres_allowed_hosts is iterable -%}
{%- for host in postgres_allowed_hosts %}
{{ host.type | default('host') }} {{ host.database | default('all') }} {{ host.user | default('all') }} {{ host.address | default('0.0.0.0/0') }} {{ item.auth | default('trust') }}
{% endfor %}
{% endif %}

View File

@@ -1,8 +1,9 @@
postgresql_data_dir: "/var/lib/postgresql/{{ postgres_version }}/main" default_postgresql_bin_path: /usr/lib/postgresql/{{ postgres_version }}/bin
postgresql_bin_path: "/usr/lib/postgresql/{{ postgres_version }}/bin" default_postgresql_config_path: /etc/postgresql/{{ postgres_version }}/main
postgresql_config_path: "/etc/postgresql/{{ postgres_version }}/main" default_postgresql_data_dir: /var/lib/postgresql/{{ postgres_version }}/main
postgresql_daemon: postgresql@{{ postgres_version }}-main default_postgresql_daemon: postgresql@{{ postgres_version }}-main
postgresql_external_pid_file: "/var/run/postgresql/{{ postgres_version }}-main.pid" default_postgresql_external_pid_file: /var/run/postgresql/{{ postgres_version }}-main.pid
postgres_apt_key_url: "https://www.postgresql.org/media/keys/ACCC4CF8.asc"
postgres_apt_key_id: "0x7FCC7D46ACCC4CF8" default_postgres_apt_key_id: '0x7FCC7D46ACCC4CF8'
postgres_apt_repository_repo: "deb https://apt.postgresql.org/pub/repos/apt/ {{ ansible_distribution_release }}-pgdg main" default_postgres_apt_key_url: https://www.postgresql.org/media/keys/ACCC4CF8.asc
default_postgres_apt_repository_repo: deb https://apt.postgresql.org/pub/repos/apt/ {{ ansible_distribution_release }}-pgdg main

View File

@@ -1,5 +1,5 @@
postgresql_bin_path: "/usr/pgsql-{{ postgres_version }}/bin" default_postgresql_bin_path: /usr/pgsql-{{ postgres_version }}/bin
postgresql_data_dir: "/var/lib/pgsql/{{ postgres_version }}/data" default_postgresql_config_path: /var/lib/pgsql/{{ postgres_version }}/data
postgresql_config_path: "/var/lib/pgsql/{{ postgres_version }}/data" default_postgresql_data_dir: /var/lib/pgsql/{{ postgres_version }}/data
postgresql_daemon: postgresql-{{ postgres_version }}.service default_postgresql_daemon: postgresql-{{ postgres_version }}.service
postgresql_external_pid_file: "/var/run/postgresql/{{ postgres_version }}-main.pid" default_postgresql_external_pid_file: /var/run/postgresql/{{ postgres_version }}-main.pid

View File

@@ -1,7 +1,7 @@
# defaults file for xray # defaults file for xray
# The version of xray to install # The version of xray to install
xray_version: 3.30.1 xray_version: 3.32.2
# whether to enable HA # whether to enable HA
xray_ha_enabled: false xray_ha_enabled: false

View File

@@ -5,3 +5,9 @@
systemd: systemd:
name: "{{ xray_daemon }}" name: "{{ xray_daemon }}"
state: restarted state: restarted
- name: stop xray
become: yes
systemd:
name: "{{ xray_daemon }}"
state: stopped

View File

@@ -1,16 +1,27 @@
---
dependencies: []
galaxy_info: galaxy_info:
author: "JFrog Maintainers Team <installers@jfrog.com>" author: "JFrog Maintainers Team <installers@jfrog.com>"
description: "The xray role will install Xray software onto the host. An Artifactory server and Postgress database is required." description: "The xray role will install Xray software onto the host. An Artifactory server and Postgress database is required."
company: JFrog company: JFrog
issue_tracker_url: "https://github.com/jfrog/JFrog-Cloud-Installers/issues" issue_tracker_url: "https://github.com/jfrog/JFrog-Cloud-Installers/issues"
license: license (Apache-2.0) license: license (Apache-2.0)
min_ansible_version: 2.9 min_ansible_version: 2.9
platforms:
- name: EL
versions:
- 7
- 8
- name: Ubuntu
versions:
- xenial
- bionic
- focal
- name: Debian
versions:
- stretch
- buster
galaxy_tags: galaxy_tags:
- xray - insight
- jfrog - jfrog
dependencies: []

View File

@@ -42,3 +42,4 @@
executable: /usr/bin/expect executable: /usr/bin/expect
chdir: "{{ exp_dir }}" chdir: "{{ exp_dir }}"
register: exp_result register: exp_result
changed_when: false

View File

@@ -1,6 +1,3 @@
- debug:
msg: "Performing installation of Xray version : {{ xray_version }}"
- name: Install prerequisite packages - name: Install prerequisite packages
include_tasks: "{{ ansible_os_family }}.yml" include_tasks: "{{ ansible_os_family }}.yml"
@@ -56,7 +53,10 @@
- name: Copy untar directory to xray home - name: Copy untar directory to xray home
become: yes become: yes
command: "cp -r {{ xray_untar_home }}/. {{ xray_home }}" copy:
src: "{{ xray_untar_home }}/"
dest: "{{ xray_home }}"
remote_src: yes
when: not app_dir_check.stat.exists when: not app_dir_check.stat.exists
- name: Create required directories - name: Create required directories
@@ -115,6 +115,7 @@
template: template:
src: "rabbitmq.conf.j2" src: "rabbitmq.conf.j2"
dest: "{{ xray_home }}/app/bin/rabbitmq/rabbitmq.conf" dest: "{{ xray_home }}/app/bin/rabbitmq/rabbitmq.conf"
mode: 0644
notify: restart xray notify: restart xray
- name: Configure installer info - name: Configure installer info
@@ -122,22 +123,24 @@
template: template:
src: installer-info.json.j2 src: installer-info.json.j2
dest: "{{ xray_home }}/var/etc/info/installer-info.json" dest: "{{ xray_home }}/var/etc/info/installer-info.json"
mode: 0644
notify: restart xray notify: restart xray
- name: Check if systemyaml exists - name: Check if system.yaml exists
become: yes become: yes
stat: stat:
path: "{{ xray_home }}/var/etc/system.yaml" path: "{{ xray_home }}/var/etc/system.yaml"
register: systemyaml register: systemyaml
- name: Configure systemyaml - name: Configure system.yaml
become: yes become: yes
template: template:
src: "{{ xray_system_yaml_template }}" src: "{{ xray_system_yaml_template }}"
dest: "{{ xray_home }}/var/etc/system.yaml" dest: "{{ xray_home }}/var/etc/system.yaml"
mode: 0644
when: when:
- xray_systemyaml is defined - xray_systemyaml is defined
- xray_systemyaml|length > 0 - xray_systemyaml | length > 0
- xray_systemyaml_override or (not systemyaml.stat.exists) - xray_systemyaml_override or (not systemyaml.stat.exists)
notify: restart xray notify: restart xray
@@ -152,7 +155,7 @@
- name: Install xray as a service - name: Install xray as a service
become: yes become: yes
shell: "{{ xray_archive_service_cmd }}" command: "{{ xray_archive_service_cmd }}"
args: args:
chdir: "{{ xray_install_script_path }}" chdir: "{{ xray_install_script_path }}"
creates: "{{ xray_service_file }}" creates: "{{ xray_service_file }}"

View File

@@ -1,63 +0,0 @@
- name: Check rabbitmq cluster_keepalive_interval option
become: yes
ignore_errors: yes
shell: |
./rabbitmqctl --erlang-cookie {{ xray_rabbitmq_default_cookie }} eval \
'application:get_env(rabbit, cluster_keepalive_interval).' \
| tr -d '}{' | cut -d ',' -f2
args:
chdir: "{{ xray_home }}/app/third-party/rabbitmq/sbin/"
environment:
LC_ALL: en_US.UTF-8
LC_CTYPE: en_US.UTF-8
register: cluster_keepalive_interval_value
- name: Check rabbitmq handshake_timeout option
become: yes
ignore_errors: yes
shell: |
./rabbitmqctl --erlang-cookie {{ xray_rabbitmq_default_cookie }} eval \
'application:get_env(rabbit, handshake_timeout).' \
| tr -d '}{' | cut -d ',' -f2
args:
chdir: "{{ xray_home }}/app/third-party/rabbitmq/sbin/"
environment:
LC_ALL: en_US.UTF-8
LC_CTYPE: en_US.UTF-8
register: handshake_timeout_value
- name: Check rabbitmq vm_memory_high_watermark.relative option
become: yes
ignore_errors: yes
shell: |
./rabbitmqctl --erlang-cookie {{ xray_rabbitmq_default_cookie }} eval \
'application:get_env(rabbit, vm_memory_high_watermark).' \
| tr -d '}{' | cut -d ',' -f2
args:
chdir: "{{ xray_home }}/app/third-party/rabbitmq/sbin/"
environment:
LC_ALL: en_US.UTF-8
LC_CTYPE: en_US.UTF-8
register: vm_memory_high_watermark_relative_value
- name: Store result
include_role:
name: report
vars:
stop_testing_if_fail: false
test_description: "{{ test_ext_description }}Check rabbitmq custom options values. INST-775"
test_host: "{{ inventory_hostname }}"
test_result: >-
{{
vm_memory_high_watermark_relative_value.stdout == rabbitmq_custom_values['vm_memory_high_watermark']
and cluster_keepalive_interval_value.stdout == rabbitmq_custom_values['cluster_keepalive_interval']
and handshake_timeout_value.stdout == rabbitmq_custom_values['handshake_timeout']
}}
report_action: "store-result"
log_result: >-
{{
{}
| combine({'handshake_timeout': {'real': handshake_timeout_value.stdout, 'expected': rabbitmq_custom_values.handshake_timeout}})
| combine({'vm_memory_high_watermark': {'real': vm_memory_high_watermark_relative_value.stdout, 'expected': rabbitmq_custom_values.vm_memory_high_watermark}})
| combine({'cluster_keepalive_interval': {'real': cluster_keepalive_interval_value.stdout, 'expected': rabbitmq_custom_values.cluster_keepalive_interval}})
}}

View File

@@ -45,6 +45,17 @@
xray_erlang_package: "{{ check_erlang_package_result.files[0].path }}" xray_erlang_package: "{{ check_erlang_package_result.files[0].path }}"
when: check_erlang_package_result.matched > 0 when: check_erlang_package_result.matched > 0
- name: Import RabbitMQ release signing key
become: yes
ignore_errors: yes
rpm_key:
key: https://github.com/rabbitmq/signing-keys/releases/download/2.0/rabbitmq-release-signing-key.asc
state: present
register: import_rabbitmq_signing_key_result
until: import_rabbitmq_signing_key_result is succeeded
delay: 5
retries: 3
- name: Install erlang package - name: Install erlang package
become: yes become: yes
yum: yum:

View File

@@ -1,12 +0,0 @@
- name: Get rabbitmq ha cluster status
become: yes
ignore_errors: yes
shell: |
./rabbitmqctl --erlang-cookie {{ xray_rabbitmq_default_cookie }} \
--formatter json cluster_status | jq .
args:
chdir: "{{ xray_home }}/app/third-party/rabbitmq/sbin/"
environment:
LC_ALL: en_US.UTF-8
LC_CTYPE: en_US.UTF-8
register: ha_rabbitmq_cluster_status

View File

@@ -1,6 +1,4 @@
- debug: ---
msg: "Performing upgrade of Xray version to {{ xray_version }}..."
- name: Check if xray tar exists - name: Check if xray tar exists
become: yes become: yes
stat: stat:
@@ -30,11 +28,7 @@
when: download_xray is succeeded when: download_xray is succeeded
- name: stop xray - name: stop xray
become: yes meta: flush_handlers
systemd:
name: "{{ xray_daemon }}"
state: stopped
when: download_xray.changed
- name: Delete xray app - name: Delete xray app
become: yes become: yes
@@ -88,6 +82,7 @@
template: template:
src: "rabbitmq.conf.j2" src: "rabbitmq.conf.j2"
dest: "{{ xray_home }}/app/bin/rabbitmq/rabbitmq.conf" dest: "{{ xray_home }}/app/bin/rabbitmq/rabbitmq.conf"
mode: 0644
when: when:
- download_xray.changed - download_xray.changed
notify: restart xray notify: restart xray
@@ -103,6 +98,7 @@
template: template:
src: "{{ xray_system_yaml_template }}" src: "{{ xray_system_yaml_template }}"
dest: "{{ xray_home }}/var/etc/system.yaml" dest: "{{ xray_home }}/var/etc/system.yaml"
mode: 0644
when: when:
- xray_systemyaml is defined - xray_systemyaml is defined
- xray_systemyaml|length > 0 - xray_systemyaml|length > 0
@@ -114,6 +110,7 @@
template: template:
src: installer-info.json.j2 src: installer-info.json.j2
dest: "{{ xray_home }}/var/etc/info/installer-info.json" dest: "{{ xray_home }}/var/etc/info/installer-info.json"
mode: 0644
notify: restart xray notify: restart xray
- name: Ensure permissions are correct - name: Ensure permissions are correct

View File

@@ -1,5 +1,5 @@
# platform collection version # platform collection version
platform_collection_version: 7.24.3 platform_collection_version: 7.25.7
# indicates were this collection was downlaoded from (galaxy, automation_hub, standalone) # indicates were this collection was downlaoded from (galaxy, automation_hub, standalone)
ansible_marketplace: galaxy ansible_marketplace: galaxy

View File

@@ -14,7 +14,7 @@ xray_installer_scenario:
} }
- { - {
"expecting": "please specify the ip address of this machine(?!.*Skipping prompt)", "expecting": "please specify the ip address of this machine(?!.*Skipping prompt)",
"sending": "{% if xray_ha_node_type is defined and xray_ha_node_type == 'master' %}{{ ansible_host }}{% else %}{{ ansible_host }}{% endif %}" "sending": "{{ ansible_host }}"
} }
- { - {
"expecting": "are you adding an additional node", "expecting": "are you adding an additional node",