lean-delivery / ansible-role-elasticsearch Goto Github PK
View Code? Open in Web Editor NEWAnsible Role - Elasticsearch
License: Apache License 2.0
Ansible Role - Elasticsearch
License: Apache License 2.0
File selinux-support.yml does not find in a specific directory. Testinfra test reports WARNING on lint check.
testinfra test
ansible 2.5.15
config file = None
configured module search path = ['/Users/lab/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/lib/python3.7/site-packages/ansible
executable location = /usr/local/bin/ansible
python version = 3.7.2 (default, Feb 12 2019, 08:15:36) [Clang 10.0.0 (clang-1000.11.45.5)]
molecule, version 2.20.0
N/A
See the following job:
https://gitlab.com/lean-delivery/ansible-role-elasticsearch/-/jobs/173370583
Examining /Users/lab/ansible/epam-elk-vers-problem/roles/ansible-role-elasticsearch/tasks/add-scripts.yml of type tasks
Examining /Users/lab/ansible/epam-elk-vers-problem/roles/ansible-role-elasticsearch/tasks/selinux-support.yml of type tasks
Examining /Users/lab/ansible/epam-elk-vers-problem/roles/ansible-role-elasticsearch/tasks/es-settings.yml of type tasks
Examining /Users/lab/ansible/epam-elk-vers-problem/roles/ansible-role-elasticsearch/tasks/main.yml of type tasks
Examining /Users/lab/ansible/epam-elk-vers-problem/roles/ansible-role-elasticsearch/tasks/system/RedHat.yml of type tasks
Examining /Users/lab/ansible/epam-elk-vers-problem/roles/ansible-role-elasticsearch/tasks/system/Debian.yml of type tasks
Examining /Users/lab/ansible/epam-elk-vers-problem/roles/ansible-role-elasticsearch/tasks/system/not-supported.yml of type tasks
Examining /Users/lab/ansible/epam-elk-vers-problem/roles/ansible-role-elasticsearch/handlers/main.yml of type handlers
Examining /Users/lab/ansible/epam-elk-vers-problem/roles/ansible-role-elasticsearch/meta/main.yml of type meta
Lint completed successfully.
Examining /Users/lab/ansible/epam-tmp-elk/roles/ansible-role-elasticsearch/tasks/add-scripts.yml of type tasks
Examining /Users/lab/ansible/epam-tmp-elk/roles/ansible-role-elasticsearch/tasks/selinux-support.yml of type tasks
Examining /Users/lab/ansible/epam-tmp-elk/roles/ansible-role-elasticsearch/tasks/es-settings.yml of type tasks
Examining /Users/lab/ansible/epam-tmp-elk/roles/ansible-role-elasticsearch/tasks/main.yml of type tasks
Examining /Users/lab/ansible/epam-tmp-elk/roles/ansible-role-elasticsearch/tasks/system/RedHat.yml of type tasks
Examining /Users/lab/ansible/epam-tmp-elk/roles/ansible-role-elasticsearch/tasks/system/Debian.yml of type tasks
Examining /Users/lab/ansible/epam-tmp-elk/roles/ansible-role-elasticsearch/tasks/system/not-supported.yml of type tasks
Examining /Users/lab/ansible/epam-tmp-elk/roles/ansible-role-elasticsearch/handlers/main.yml of type handlers
Examining /Users/lab/ansible/epam-tmp-elk/roles/ansible-role-elasticsearch/meta/main.yml of type meta
Examining /Users/lab/ansible/epam-tmp-elk/roles/ansible-role-elasticsearch/tasks/tasks/selinux-support.yml of type tasks
WARNING: Couldn't open /Users/lab/ansible/epam-tmp-elk/roles/ansible-role-elasticsearch/tasks/tasks/selinux-support.yml - No such file or directory
Lint completed successfully.
Testinfra test reports failure on generate log4j2.properties file
testinfra test
ansible 2.5.15
config file = None
configured module search path = ['/Users/lab/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/lib/python3.7/site-packages/ansible
executable location = /usr/local/bin/ansible
python version = 3.7.2 (default, Feb 12 2019, 08:15:36) [Clang 10.0.0 (clang-1000.11.45.5)]
ansible-config dump --only-changed
DEFAULT_MODULE_PATH(env: ANSIBLE_LIBRARY) = ['/Users/lab/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
molecule --version
molecule, version 2.20.0
N/A
If es_version is not defined role got error on "Copy Configuration Files" task.
---
- name: Converge
hosts: all
roles:
- role: lean_delivery.java
java_major_version: 11
- role: ansible-role-elasticsearch
elasticsearch_host: localhost
elastic_branch: 6
# es_version: 6.4.3
# es_use_oss_version: True
es_data_dirs:
- /opt/elda
- /opt/eldb
Successfully installed elasticsearch.
TASK [ansible-role-elasticsearch : Load a variable file based on the OS type, or a default if not found] ***
ok: [centos7] => (item=/Users/lab/ansible/epam-tmp-elk/roles/ansible-role-elasticsearch/vars/RedHat.yml)
ok: [debian9] => (item=/Users/lab/ansible/epam-tmp-elk/roles/ansible-role-elasticsearch/vars/Debian.yml)
ok: [ubuntu18] => (item=/Users/lab/ansible/epam-tmp-elk/roles/ansible-role-elasticsearch/vars/Debian.yml)
TASK [ansible-role-elasticsearch : Load a variable file based on the service manager] ***
ok: [centos7] => (item=/Users/lab/ansible/epam-tmp-elk/roles/ansible-role-elasticsearch/vars/systemd.yml)
ok: [debian9] => (item=/Users/lab/ansible/epam-tmp-elk/roles/ansible-role-elasticsearch/vars/systemd.yml)
ok: [ubuntu18] => (item=/Users/lab/ansible/epam-tmp-elk/roles/ansible-role-elasticsearch/vars/systemd.yml)
TASK [ansible-role-elasticsearch : Configure and install packages for current OS] ***
included: /Users/lab/ansible/epam-tmp-elk/roles/ansible-role-elasticsearch/tasks/system/RedHat.yml for centos7
included: /Users/lab/ansible/epam-tmp-elk/roles/ansible-role-elasticsearch/tasks/system/Debian.yml for debian9, ubuntu18
TASK [ansible-role-elasticsearch : Set elasticsearch version if defined] *******
skipping: [centos7]
TASK [ansible-role-elasticsearch : Importing latest logstash GPG Key] **********
changed: [centos7]
TASK [ansible-role-elasticsearch : Add elasticsearch yum repository] ***********
changed: [centos7]
TASK [ansible-role-elasticsearch : Redhat - Installing Elasticsearch package] ***
changed: [centos7]
TASK [ansible-role-elasticsearch : Checking selinux support] *******************
included: /Users/lab/ansible/epam-tmp-elk/roles/ansible-role-elasticsearch/tasks/selinux-support.yml for centos7
TASK [ansible-role-elasticsearch : Install ansible selinux configure libraries] ***
ok: [centos7]
TASK [ansible-role-elasticsearch : Enable connections to HTTP port] ************
changed: [centos7]
TASK [ansible-role-elasticsearch : Set elasticsearch version if defined] *******
skipping: [debian9]
skipping: [ubuntu18]
TASK [ansible-role-elasticsearch : Install apt-transport-https] ****************
ok: [ubuntu18]
changed: [debian9]
TASK [ansible-role-elasticsearch : Elastic Import latest logstash GPG Key] *****
changed: [ubuntu18]
changed: [debian9]
TASK [ansible-role-elasticsearch : Add elasticsearch repo] *********************
changed: [debian9]
changed: [ubuntu18]
TASK [ansible-role-elasticsearch : Debian - Installing Elasticsearch package] ***
changed: [debian9]
changed: [ubuntu18]
TASK [ansible-role-elasticsearch : Correcting elasticsearch default settings] ***
included: /Users/lab/ansible/epam-tmp-elk/roles/ansible-role-elasticsearch/tasks/es-settings.yml for centos7, debian9, ubuntu18
TASK [ansible-role-elasticsearch : Setting m_lock] *****************************
skipping: [centos7]
skipping: [debian9]
skipping: [ubuntu18]
TASK [ansible-role-elasticsearch : Check default home path] ********************
ok: [debian9]
ok: [ubuntu18]
ok: [centos7]
TASK [ansible-role-elasticsearch : Copy home to new destination] ***************
skipping: [centos7]
skipping: [debian9]
skipping: [ubuntu18]
TASK [ansible-role-elasticsearch : Remove old destination] *********************
skipping: [centos7]
skipping: [debian9]
skipping: [ubuntu18]
TASK [ansible-role-elasticsearch : Remove default redefined paths] *************
skipping: [centos7] => (item=es_conf_dir)
skipping: [centos7] => (item=es_log_dir)
skipping: [centos7] => (item=es_pid_dir)
skipping: [debian9] => (item=es_conf_dir)
skipping: [debian9] => (item=es_log_dir)
skipping: [debian9] => (item=es_pid_dir)
skipping: [ubuntu18] => (item=es_conf_dir)
skipping: [ubuntu18] => (item=es_log_dir)
skipping: [ubuntu18] => (item=es_pid_dir)
ok: [centos7] => (item=es_data_dirs)
ok: [ubuntu18] => (item=es_data_dirs)
ok: [debian9] => (item=es_data_dirs)
TASK [ansible-role-elasticsearch : Create paths if absent] *********************
changed: [ubuntu18] => (item=es_conf_dir)
changed: [centos7] => (item=es_conf_dir)
changed: [debian9] => (item=es_conf_dir)
ok: [ubuntu18] => (item=es_log_dir)
ok: [debian9] => (item=es_log_dir)
ok: [centos7] => (item=es_log_dir)
ok: [ubuntu18] => (item=es_pid_dir)
ok: [debian9] => (item=es_pid_dir)
ok: [centos7] => (item=es_pid_dir)
TASK [ansible-role-elasticsearch : Create data paths if absent] ****************
changed: [centos7] => (item=/opt/elda)
changed: [debian9] => (item=/opt/elda)
changed: [ubuntu18] => (item=/opt/elda)
changed: [centos7] => (item=/opt/eldb)
changed: [debian9] => (item=/opt/eldb)
changed: [ubuntu18] => (item=/opt/eldb)
TASK [ansible-role-elasticsearch : Copy Configuration Files] *******************
changed: [debian9] => (item=elasticsearch.yml)
changed: [centos7] => (item=elasticsearch.yml)
changed: [ubuntu18] => (item=elasticsearch.yml)
changed: [debian9] => (item=jvm.options)
changed: [ubuntu18] => (item=jvm.options)
failed: [ubuntu18] (item=log4j2.properties) => {"changed": false, "es_config_item": "log4j2.properties", "msg": "AnsibleFilterError: Version comparison: '<' not supported between instances of 'str' and 'int'"}
failed: [debian9] (item=log4j2.properties) => {"changed": false, "es_config_item": "log4j2.properties", "msg": "AnsibleFilterError: Version comparison: '<' not supported between instances of 'str' and 'int'"}
changed: [centos7] => (item=jvm.options)
failed: [centos7] (item=log4j2.properties) => {"changed": false, "es_config_item": "log4j2.properties", "msg": "AnsibleFilterError: Version comparison: '<' not supported between instances of 'str' and 'int'"}
RUNNING HANDLER [ansible-role-elasticsearch : Restart elasticsearch] ***********
PLAY RECAP *********************************************************************
centos7 : ok=33 changed=12 unreachable=0 failed=1
debian9 : ok=31 changed=12 unreachable=0 failed=1
ubuntu18 : ok=31 changed=11 unreachable=0 failed=1
ERROR:
to_nice_yaml ansible filter breaks the elasticsearch config
to_nice_yaml ansible filter
ansible 2.9.3
CentOS 7
Just deploy the cluster
Host are going to communicate on initial step
elasticsearch.log:
[2020-04-09T11:59:16,786][WARN ][o.e.d.SeedHostsResolver ] [x.x.x.73]failed to resolve host [id001
elasticsearch.yaml:
cluster.initial_master_nodes: &id001 [x.x.x.73, x.x.x.252, x.x.x.x.78]
cluster.name: prod_cluster
discovery.zen.minimum_master_nodes: 2
discovery.zen.ping.unicast.hosts: *id001
network.host: [local, site]
node.data: true
node.master: true
node.name: some_node
Master not discovered exception
elasticsearch.yml
ansible 2.9
ubuntu 18.04
Install Java & ElasticSearch roles
All works as should
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.