test: use personal docker registry
This commit is contained in:
parent
5b724251ed
commit
fe419e8da8
3 changed files with 49 additions and 45 deletions
|
@ -10,6 +10,10 @@ Which is based on [Keep A Changelog](http://keepachangelog.com/)
|
|||
- test: add support debian 12
|
||||
- feat: manage logging config
|
||||
|
||||
### Changed
|
||||
|
||||
- test: use personal docker registry
|
||||
|
||||
### Removed
|
||||
|
||||
- test: remove support debian 10
|
||||
|
|
88
README.md
88
README.md
|
@ -1,27 +1,27 @@
|
|||
# Ansible role: Logstash
|
||||
|
||||
[![Version](https://img.shields.io/badge/latest_version-1.1.0-green.svg)](https://git.yaegashi.fr/nishiki/ansible-role-logstash/releases)
|
||||
[![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](https://git.yaegashi.fr/nishiki/ansible-role-logstash/src/branch/master/LICENSE)
|
||||
[![Version](https://img.shields.io/badge/latest_version-1.1.0-green.svg)](https://code.waks.be/nishiki/ansible-role-logstash/releases)
|
||||
[![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](https://code.waks.be/nishiki/ansible-role-logstash/src/branch/main/LICENSE)
|
||||
|
||||
Install and configure logstash
|
||||
|
||||
## Requirements
|
||||
|
||||
* Ansible >= 2.9
|
||||
* Debian
|
||||
* Bookworm
|
||||
- Ansible >= 2.9
|
||||
- Debian
|
||||
- Bookworm
|
||||
|
||||
## Role variables
|
||||
|
||||
* `logstash_major_version` set major version to install- (default: `7`)
|
||||
* `logstash_plugins` - array with the plugins to install
|
||||
- `logstash_major_version` set major version to install- (default: `7`)
|
||||
- `logstash_plugins` - array with the plugins to install
|
||||
|
||||
```
|
||||
- name: logstash-output-influxdb
|
||||
state: present
|
||||
```
|
||||
|
||||
* `logstash_config` - hash with the configuration (see [logstash documentation](https://www.elastic.co/guide/en/logstash/current/configuration.html))
|
||||
- `logstash_config` - hash with the configuration (see [logstash documentation](https://www.elastic.co/guide/en/logstash/current/configuration.html))
|
||||
|
||||
```
|
||||
path.data: /var/lib/logstash
|
||||
|
@ -69,38 +69,38 @@ Install and configure logstash
|
|||
- `logstash_logging_config` - hash with logging config (log4j2)
|
||||
|
||||
```yaml
|
||||
status: "error"
|
||||
name: "LogstashPropertiesConfig"
|
||||
appender.rolling.type: "RollingFile"
|
||||
appender.rolling.name: "plain_rolling"
|
||||
appender.rolling.fileName: "${sys:ls.logs}/logstash-plain.log"
|
||||
appender.rolling.filePattern: "${sys:ls.logs}/logstash-plain-%d{yyyy-MM-dd}-%i.log.gz"
|
||||
appender.rolling.policies.type: "Policies"
|
||||
appender.rolling.policies.time.type: "TimeBasedTriggeringPolicy"
|
||||
appender.rolling.policies.time.interval: "1"
|
||||
appender.rolling.policies.time.modulate: true
|
||||
appender.rolling.layout.type: "PatternLayout"
|
||||
appender.rolling.layout.pattern: "[%d{ISO8601}][%-5p][%-25c]%notEmpty{[%X{pipeline.id}]}%notEmpty{[%X{plugin.id}]} %m%n"
|
||||
appender.rolling.policies.size.type: "SizeBasedTriggeringPolicy"
|
||||
appender.rolling.policies.size.size: "100MB"
|
||||
appender.rolling.strategy.type: "DefaultRolloverStrategy"
|
||||
appender.rolling.strategy.max: 30
|
||||
appender.rolling.avoid_pipelined_filter.type: "PipelineRoutingFilter"
|
||||
appender.routing.type: "PipelineRouting"
|
||||
appender.routing.name: "pipeline_routing_appender"
|
||||
appender.routing.pipeline.type: "RollingFile"
|
||||
appender.routing.pipeline.name: "appender-${ctx:pipeline.id}"
|
||||
appender.routing.pipeline.fileName: "${sys:ls.logs}/pipeline_${ctx:pipeline.id}.log"
|
||||
appender.routing.pipeline.filePattern: "${sys:ls.logs}/pipeline_${ctx:pipeline.id}.%i.log.gz"
|
||||
appender.routing.pipeline.layout.type: "PatternLayout"
|
||||
appender.routing.pipeline.layout.pattern: "[%d{ISO8601}][%-5p][%-25c] %m%n"
|
||||
appender.routing.pipeline.policy.type: "SizeBasedTriggeringPolicy"
|
||||
appender.routing.pipeline.policy.size: "100MB"
|
||||
appender.routing.pipeline.strategy.type: "DefaultRolloverStrategy"
|
||||
appender.routing.pipeline.strategy.max: 30
|
||||
rootLogger.level: "${sys:ls.log.level}"
|
||||
rootLogger.appenderRef.rolling.ref: "${sys:ls.log.format}_rolling"
|
||||
rootLogger.appenderRef.routing.ref: "pipeline_routing_appender"
|
||||
status: "error"
|
||||
name: "LogstashPropertiesConfig"
|
||||
appender.rolling.type: "RollingFile"
|
||||
appender.rolling.name: "plain_rolling"
|
||||
appender.rolling.fileName: "${sys:ls.logs}/logstash-plain.log"
|
||||
appender.rolling.filePattern: "${sys:ls.logs}/logstash-plain-%d{yyyy-MM-dd}-%i.log.gz"
|
||||
appender.rolling.policies.type: "Policies"
|
||||
appender.rolling.policies.time.type: "TimeBasedTriggeringPolicy"
|
||||
appender.rolling.policies.time.interval: "1"
|
||||
appender.rolling.policies.time.modulate: true
|
||||
appender.rolling.layout.type: "PatternLayout"
|
||||
appender.rolling.layout.pattern: "[%d{ISO8601}][%-5p][%-25c]%notEmpty{[%X{pipeline.id}]}%notEmpty{[%X{plugin.id}]} %m%n"
|
||||
appender.rolling.policies.size.type: "SizeBasedTriggeringPolicy"
|
||||
appender.rolling.policies.size.size: "100MB"
|
||||
appender.rolling.strategy.type: "DefaultRolloverStrategy"
|
||||
appender.rolling.strategy.max: 30
|
||||
appender.rolling.avoid_pipelined_filter.type: "PipelineRoutingFilter"
|
||||
appender.routing.type: "PipelineRouting"
|
||||
appender.routing.name: "pipeline_routing_appender"
|
||||
appender.routing.pipeline.type: "RollingFile"
|
||||
appender.routing.pipeline.name: "appender-${ctx:pipeline.id}"
|
||||
appender.routing.pipeline.fileName: "${sys:ls.logs}/pipeline_${ctx:pipeline.id}.log"
|
||||
appender.routing.pipeline.filePattern: "${sys:ls.logs}/pipeline_${ctx:pipeline.id}.%i.log.gz"
|
||||
appender.routing.pipeline.layout.type: "PatternLayout"
|
||||
appender.routing.pipeline.layout.pattern: "[%d{ISO8601}][%-5p][%-25c] %m%n"
|
||||
appender.routing.pipeline.policy.type: "SizeBasedTriggeringPolicy"
|
||||
appender.routing.pipeline.policy.size: "100MB"
|
||||
appender.routing.pipeline.strategy.type: "DefaultRolloverStrategy"
|
||||
appender.routing.pipeline.strategy.max: 30
|
||||
rootLogger.level: "${sys:ls.log.level}"
|
||||
rootLogger.appenderRef.rolling.ref: "${sys:ls.log.format}_rolling"
|
||||
rootLogger.appenderRef.routing.ref: "pipeline_routing_appender"
|
||||
```
|
||||
|
||||
## How to use
|
||||
|
@ -115,10 +115,10 @@ Install and configure logstash
|
|||
|
||||
### Test with molecule and docker
|
||||
|
||||
* install [docker](https://docs.docker.com/engine/installation/)
|
||||
* install `python3` and `python3-pip`
|
||||
* install molecule and dependencies `pip3 install molecule molecule-docker docker ansible-lint pytest-testinfra yamllint`
|
||||
* run `molecule test`
|
||||
- install [docker](https://docs.docker.com/engine/installation/)
|
||||
- install `python3` and `python3-pip`
|
||||
- install molecule and dependencies `pip3 install molecule molecule-docker docker ansible-lint pytest-testinfra yamllint`
|
||||
- run `molecule test`
|
||||
|
||||
## License
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ driver:
|
|||
name: docker
|
||||
platforms:
|
||||
- name: debian12
|
||||
image: nishiki/debian12:molecule
|
||||
image: code.waks.be/nishiki/molecule:debian12
|
||||
privileged: true
|
||||
volumes:
|
||||
- /sys/fs/cgroup:/sys/fs/cgroup:rw
|
||||
|
|
Loading…
Reference in a new issue