# defaults file for insight

# The version of insight to install
insight_version: 1.6.0

# whether to enable HA
insight_ha_enabled: false

insight_ha_node_type: master

# The location where insight should install
jfrog_home_directory: /opt/jfrog

# The remote insight download file
insight_tar_file_name: jfrog-insight-{{ insight_version }}-linux.tar.gz
insight_tar: https://releases.jfrog.io/artifactory/jfrog-insight/linux/{{ insight_version }}/{{ insight_tar_file_name }}

# Timeout in seconds for URL request
insight_download_timeout: 10

#The insight install directory
insight_untar_home: "{{ jfrog_home_directory }}/jfrog-insight-{{ insight_version }}-linux"
insight_home: "{{ jfrog_home_directory }}/insight"

insight_install_script_path: "{{ insight_home }}/app/bin"
insight_thirdparty_path: "{{ insight_home }}/app/third-party"
insight_archive_service_cmd: "{{ insight_install_script_path }}/installService.sh"
insight_service_file: /lib/systemd/system/insight.service

#insight users and groups
insight_user: insight
insight_group: insight

insight_uid: 1040
insight_gid: 1040

insight_daemon: insight

# Insight ElasticSearch Details
es_uid: 1060
es_gid: 1060

insight_es_conf_base: "/etc/elasticsearch"
insight_es_user: admin
insight_es_password: admin
insight_es_url: "http://localhost:9200"
insight_es_transport_port: 9300

insight_es_home: "/usr/share/elasticsearch"
insight_es_data_dir: "/var/lib/elasticsearch"
insight_es_log_dir: "/var/log/elasticsearch"
insight_es_java_home: "/usr/share/elasticsearch/jdk"
insight_es_script_path: "/usr/share/elasticsearch/bin"
insight_es_searchgaurd_home: "/usr/share/elasticsearch/plugins/search-guard-7"

# if this is an upgrade
insight_upgrade_only: false

insight_system_yaml_template: system.yaml.j2

# Provide systemyaml content below with 2-space indentation
insight_systemyaml: |-
  configVersion: 1
  shared:
    jfrogUrl: {{ jfrog_url }}
    node:
      ip: {{ ansible_host }}
      id: {{ ansible_hostname }}
    database:
      type: "{{ insight_db_type }}"
      driver: "{{ insight_db_driver }}"
      url: "{{ insight_db_url }}"
      username: "{{ insight_db_user }}"
    elasticsearch:
      unicastFile: {{ insight_es_conf_base }}/config/unicast_hosts.txt
      password: {{ insight_es_password }}
      url: {{ insight_es_url }}
      username: {{ insight_es_user }}
      external: true
    security:
      joinKey: {{ join_key }}
  router:
    entrypoints:
      internalPort: 8046

# Note: insight_systemyaml_override is by default false,  if you want to change default insight_systemyaml
insight_systemyaml_override: false
