This role:
- Configures Solr on Centos 7, Ubuntu or Windows host to be master or slave.
- Minimal Version of the ansible for installation: 2.7
- Java 8
- Solr installed
- Supported OS:
- CentOS
- 7
- Debian
- "Stretch"
- Ubuntu
- "Xenial"
- "Bionic"
- Windows
- "Windows Server 2008"
- "Windows Server 2008 R2"
- "Windows Server 2012"
- "Windows Server 2012 R2"
- "Windows Server 2016"
- "Windows Server 2019"
- "Windows 7"
- "Windows 8.1"
- "Windows 10"
- CentOS
-
solr_instance_type
- determines solr instance typedefault:
master
-
solr_version
- matches available version on https://archive.apache.org/dist/lucene/solr/. Tested versions 5.3-8.xdefault:
8.0.0
-
solr_config_lines
- configuration for master/slave configuration (depends on OS type and solr_instance_type) -
solr_master_generated_url
- URL for master replication. Configured for slave nodesdefault:
{{ (solr_ssl_enabled) | ternary('https', 'http') }}://\ {{ solr_master_defined_host | default(groups[(master_group | default('solr_master'))]|first) }}:\ {{ solr_port }}/solr/${solr.core.name}/replication
-
solr_dest_main_path
- root directory to store solr folderdefault:
/opt
for Linuxdefault:
C:\Solr
for Windows -
solr_dest_path
- solr folder pathdefault:
{{ dest_main_path }}/solr-{{ solr_version }}
-
solr_configset_path
- solr configset folder pathdefault:
{{ solr_home }}/configsets
for Linuxdefault:
{{ solr_dest_path }}\server\solr\configsets
for Windows -
solr_service_name
- solr service namedefault:
solr
-
solr_with_systemd
- to run solr as a servicedefault:
True
-
solr_service_start
- to start solr service in the end of role/Playbookdefault:
True
-
configset_list
- list of configset directoriesdefault:
- default
-
auto_populate_configset_list
- get all configset directories automaticallydefault:
True
-
solr_master_defined_host
- solr master host name. If defined - it will be used, else first server from solr_master group from inventory filedefault:
undefined
-
master_group
- solr master group name in inventory filedefault:
solr_master
-
solr_port
- solr master portdefault:
8983
-
solr_base_path
- path to solr basedefault:
/var/solr
-
solr_home
- path to SOLR_HOMEdefault:
{{ solr_base_path }}/data
-
solr_ssl_enabled
- defined if solr master using ssl for connectiondefault:
True
[solr_master]
solr_master.example.com
[solr-slave]
solr.example.com
[solrwin-slave]
solrwin.example.com
[solrwin-slave:vars]
ansible_user=admin
ansible_password=password
ansible_connection=winrm
ansible_winrm_server_cert_validation=ignore
[solrwin-master]
solrwin.example.com
[solrwin-master:vars]
ansible_user=admin
ansible_password=password
ansible_connection=winrm
ansible_winrm_server_cert_validation=ignore
- name: Configure Solr as slave
hosts: solr-slave
roles:
- role: lean_delivery.java
- role: lean_delivery.solr_standalone
- role: lean_delivery.solr_cluster
solr_instance_type: slave
- name: Configure Solr as master
hosts: solr_master
roles:
- role: lean_delivery.java
- role: lean_delivery.solr_standalone
- role: lean_delivery.solr_cluster
Apache
authors:
- Lean Delivery Team team@lean-delivery.com