Skip to content

Commit

Permalink
Refactor artifactory role
Browse files Browse the repository at this point in the history
  • Loading branch information
EmptyByte committed Jun 27, 2024
1 parent 6bc9625 commit 5786e55
Show file tree
Hide file tree
Showing 28 changed files with 432 additions and 467 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ The Artifactory role supports software upgrades. To use a role to perform a soft
artifactory_upgrade_only: true
roles:
- artifactory
```
```
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,13 @@ artifactory_mc_enabled: true
# The location where Artifactory should install
jfrog_home_directory: /opt/jfrog

artifactory_home: "{{ jfrog_home_directory }}/artifactory"

# Pick the Artifactory flavour to install, can be also cpp-ce/jcr/pro
artifactory_flavour: pro

# Whether to start Artifactory
artifactory_start_service: true

artifactory_extra_java_opts: -server -Xms512m -Xmx4g -Xss256k -XX:+UseG1GC
artifactory_system_yaml_template: system.yaml.j2
artifactory_tar_file_name: jfrog-artifactory-pro-{{ artifactory_version }}-linux.tar.gz
artifactory_home: "{{ jfrog_home_directory }}/artifactory"
artifactory_tar: "https://releases.jfrog.io/artifactory/artifactory-pro/org/artifactory/pro/jfrog-artifactory-pro/\
{{ artifactory_version }}/{{ artifactory_tar_file_name }}"
artifactory_untar_home: "{{ jfrog_home_directory }}/artifactory-{{ artifactory_flavour }}-{{ artifactory_version }}"
Expand All @@ -56,8 +53,6 @@ postgres_driver_download_url: "https://repo1.maven.org/maven2/org/postgresql/pos
artifactory_user: artifactory
artifactory_group: artifactory

artifactory_daemon: artifactory

artifactory_uid: 1030
artifactory_gid: 1030

Expand All @@ -71,49 +66,5 @@ artifactory_allowNonPostgresql: false
# artifactory_admin_username: admin
# artifactory_admin_password: password

artifactory_service_file: /lib/systemd/system/artifactory.service

# Provide systemyaml content below with 2-space indentation
artifactory_systemyaml: |-
configVersion: 1
shared:
security:
joinKey: "{{ join_key }}"
extraJavaOpts: "{{ artifactory_extra_java_opts }}"
node:
id: {{ ansible_hostname }}
ip: {{ ansible_host }}
taskAffinity: {{ artifactory_taskaffinity }}
haEnabled: {{ artifactory_ha_enabled }}
database:
allowNonPostgresql: {{ artifactory_allowNonPostgresql }}
type: "{{ artifactory_db_type }}"
driver: "{{ artifactory_db_driver }}"
url: "{{ artifactory_db_url }}"
username: "{{ artifactory_db_user }}"
password: "{{ artifactory_db_password }}"
mc:
enabled: {{ artifactory_mc_enabled }}
router:
entrypoints:
internalPort: 8046
# Provide binarystore XML content below with 2-space indentation
artifactory_binarystore: |-
{%- if artifactory_ha_enabled -%}
<?xml version="1.0" encoding="UTF-8"?>
<config version="2">
<chain template="cluster-file-system"/>
</config>
{%- else -%}
<?xml version="1.0" encoding="UTF-8"?>
<config version="1">
<chain template="file-system"/>
</config>
{%- endif -%}
# Note: artifactory_systemyaml_override is by default false, if you want to change default artifactory_systemyaml
artifactory_systemyaml_override: false

# Allow artifactory user to create crontab rules
artifactory_allow_crontab: false
# Allow artifactory user to create crontab rules (required by app ?)
artifactory_allow_crontab: true
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
---
# handlers file for distribution

- name: Restart artifactory
become: true
ansible.builtin.systemd:
ansible.builtin.systemd_service:
name: "{{ artifactory_daemon }}"
state: restarted
daemon_reload: true
when:
- artifactory_start_service | bool

- name: Stop artifactory
become: true
ansible.builtin.systemd:
ansible.builtin.systemd_service:
name: "{{ artifactory_daemon }}"
state: stopped
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ galaxy_info:
company: JFrog
issue_tracker_url: "https://github.com/jfrog/JFrog-Cloud-Installers/issues"
license: license (Apache-2.0)
min_ansible_version: 2.9
min_ansible_version: '2.9'
platforms:
- name: EL
versions:
- 7
- 8
- 9
- name: Ubuntu
versions:
- bionic
Expand Down

This file was deleted.

This file was deleted.

Loading

0 comments on commit 5786e55

Please sign in to comment.