test: use personal docker registry
This commit is contained in:
parent
5c17df22bf
commit
6aefa90eaa
3 changed files with 56 additions and 57 deletions
|
@ -24,6 +24,7 @@ Which is based on [Keep A Changelog](http://keepachangelog.com/)
|
||||||
- major default version is 8
|
- major default version is 8
|
||||||
- replace kitchen to molecule
|
- replace kitchen to molecule
|
||||||
- replace apt_key to get_url
|
- replace apt_key to get_url
|
||||||
|
- test: use personal docker registry
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
|
58
README.md
58
README.md
|
@ -1,36 +1,36 @@
|
||||||
# Ansible role: Elasticsearch
|
# Ansible role: Elasticsearch
|
||||||
|
|
||||||
[![Version](https://img.shields.io/badge/latest_version-1.1.0-green.svg)](https://git.yaegashi.fr/nishiki/ansible-role-elasticsearch/releases)
|
[![Version](https://img.shields.io/badge/latest_version-1.1.0-green.svg)](https://code.waks.be/nishiki/ansible-role-elasticsearch/releases)
|
||||||
[![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](https://git.yaegashi.fr/nishiki/ansible-role-elasticsearch/src/branch/master/LICENSE)
|
[![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](https://code.waks.be/nishiki/ansible-role-elasticsearch/src/branch/main/LICENSE)
|
||||||
|
|
||||||
Install and configure Elasticsearch
|
Install and configure Elasticsearch
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
* Ansible >= 2.9
|
- Ansible >= 2.9
|
||||||
* Debian
|
- Debian
|
||||||
* Bookworm
|
- Bookworm
|
||||||
|
|
||||||
## Role variables
|
## Role variables
|
||||||
|
|
||||||
* `elasticsearch_major_version` - set the major version (default: `7`)
|
- `elasticsearch_major_version` - set the major version (default: `7`)
|
||||||
* `elasticsearch_master` - set if the node is master (default: `true`)
|
- `elasticsearch_master` - set if the node is master (default: `true`)
|
||||||
* `elasticsearch_heap_size` - set the heap size (default: `1g`)
|
- `elasticsearch_heap_size` - set the heap size (default: `1g`)
|
||||||
* `elasticsearch_api_user` - set the admin user (default: `elastic`)
|
- `elasticsearch_api_user` - set the admin user (default: `elastic`)
|
||||||
* `elasticsearch_api_password` - set the password for api
|
- `elasticsearch_api_password` - set the password for api
|
||||||
* `elasticsearch_config` - hash with the configuration (see [elasticsearch documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/settings.html))
|
- `elasticsearch_config` - hash with the configuration (see [elasticsearch documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/settings.html))
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
path.data: /var/lib/elasticsearch
|
path.data: /var/lib/elasticsearch
|
||||||
path.logs: /var/log/elasticsearch
|
path.logs: /var/log/elasticsearch
|
||||||
```
|
```
|
||||||
|
|
||||||
* `elasticsearch_ssl_key`: - string contain ssl private key if `xpack.security.transport.ssl.key` is defined in elasticsearch_config
|
- `elasticsearch_ssl_key`: - string contain ssl private key if `xpack.security.transport.ssl.key` is defined in elasticsearch_config
|
||||||
* `elasticsearch_ssl_certificate`: - string contain ssl certificate if `xpack.security.transport.certificate.key` is defined in elasticsearch_config
|
- `elasticsearch_ssl_certificate`: - string contain ssl certificate if `xpack.security.transport.certificate.key` is defined in elasticsearch_config
|
||||||
* `elasticsearch_roles` - hash with the roles to managed
|
- `elasticsearch_roles` - hash with the roles to managed
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
myrole:
|
myrole:
|
||||||
cluster:
|
cluster:
|
||||||
- all
|
- all
|
||||||
indices:
|
indices:
|
||||||
|
@ -40,23 +40,23 @@ Install and configure Elasticsearch
|
||||||
- write
|
- write
|
||||||
```
|
```
|
||||||
|
|
||||||
* `elasticsearch_users` - hash with the users to managed
|
- `elasticsearch_users` - hash with the users to managed
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
toto:
|
toto:
|
||||||
password: supers3cret
|
password: supers3cret
|
||||||
roles:
|
roles:
|
||||||
- viewer
|
- viewer
|
||||||
kibana_system:
|
kibana_system:
|
||||||
password: supertest2
|
password: supertest2
|
||||||
```
|
```
|
||||||
|
|
||||||
* `elasticsearch_index_templates` - hash with the index templates configuration
|
- `elasticsearch_index_templates` - hash with the index templates configuration
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
logstash:
|
logstash:
|
||||||
index_patterns:
|
index_patterns:
|
||||||
- 'logstash-*'
|
- "logstash-*"
|
||||||
settings:
|
settings:
|
||||||
index:
|
index:
|
||||||
number_of_replicas: 3
|
number_of_replicas: 3
|
||||||
|
@ -68,10 +68,10 @@ Install and configure Elasticsearch
|
||||||
format: YYYY-MM-dd
|
format: YYYY-MM-dd
|
||||||
```
|
```
|
||||||
|
|
||||||
* `elasticsearch_ilm_policies` - hash with the ilm policies configuration
|
- `elasticsearch_ilm_policies` - hash with the ilm policies configuration
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
autoclean:
|
autoclean:
|
||||||
delete:
|
delete:
|
||||||
min_age: 30d
|
min_age: 30d
|
||||||
actions:
|
actions:
|
||||||
|
@ -90,10 +90,10 @@ Install and configure Elasticsearch
|
||||||
|
|
||||||
### Test with molecule and docker
|
### Test with molecule and docker
|
||||||
|
|
||||||
* install [docker](https://docs.docker.com/engine/installation/)
|
- install [docker](https://docs.docker.com/engine/installation/)
|
||||||
* install `python3` and `python3-pip`
|
- install `python3` and `python3-pip`
|
||||||
* install molecule and dependencies `pip3 install molecule 'molecule[docker]' ansible-lint testinfra yamllint`
|
- install molecule and dependencies `pip3 install molecule 'molecule[docker]' ansible-lint testinfra yamllint`
|
||||||
* run `molecule test`
|
- run `molecule test`
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ driver:
|
||||||
name: docker
|
name: docker
|
||||||
platforms:
|
platforms:
|
||||||
- name: debian12
|
- name: debian12
|
||||||
image: nishiki/debian12:molecule
|
image: code.waks.be/nishiki/molecule:debian12
|
||||||
privileged: true
|
privileged: true
|
||||||
volumes:
|
volumes:
|
||||||
- /sys/fs/cgroup:/sys/fs/cgroup:rw
|
- /sys/fs/cgroup:/sys/fs/cgroup:rw
|
||||||
|
@ -11,8 +11,6 @@ platforms:
|
||||||
command: /bin/systemd
|
command: /bin/systemd
|
||||||
capabilities:
|
capabilities:
|
||||||
- SYS_ADMIN
|
- SYS_ADMIN
|
||||||
published_ports:
|
|
||||||
- 127.0.0.1:5601:5601
|
|
||||||
lint: |
|
lint: |
|
||||||
set -e
|
set -e
|
||||||
yamllint .
|
yamllint .
|
||||||
|
|
Loading…
Reference in a new issue