chore: use FQCN for module name
This commit is contained in:
parent
0e2ddafd1d
commit
602f3cb840
3 changed files with 15 additions and 15 deletions
|
@ -14,6 +14,7 @@ Which is based on [Keep A Changelog](http://keepachangelog.com/)
|
|||
|
||||
- change logstash_inputs variable: dict to array
|
||||
- test: replace kitchen to molecule
|
||||
- chore: use FQCN for module name
|
||||
|
||||
### Removed
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
- name: restart logstash
|
||||
systemd:
|
||||
ansible.builtin.service:
|
||||
name: logstash
|
||||
state: restarted
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
---
|
||||
- name: install dependencies packages
|
||||
package:
|
||||
name: '{{ packages }}'
|
||||
vars:
|
||||
packages:
|
||||
ansible.builtin.package:
|
||||
name:
|
||||
- apt-transport-https
|
||||
- default-jre
|
||||
- gpg
|
||||
|
@ -13,7 +11,7 @@
|
|||
tags: logstash
|
||||
|
||||
- name: add repository key
|
||||
apt_key:
|
||||
ansible.builtin.apt_key:
|
||||
url: https://artifacts.elastic.co/GPG-KEY-elasticsearch
|
||||
retries: 2
|
||||
register: result
|
||||
|
@ -21,20 +19,21 @@
|
|||
tags: logstash
|
||||
|
||||
- name: add repository
|
||||
apt_repository:
|
||||
ansible.builtin.apt_repository:
|
||||
repo: 'deb https://artifacts.elastic.co/packages/{{ logstash_major_version }}.x/apt stable main'
|
||||
tags: logstash
|
||||
|
||||
- name: install package
|
||||
apt:
|
||||
name: logstash
|
||||
ansible.builtin.package:
|
||||
name:
|
||||
- logstash
|
||||
retries: 2
|
||||
register: result
|
||||
until: result is succeeded
|
||||
tags: logstash
|
||||
|
||||
- name: copy general config file
|
||||
copy:
|
||||
ansible.builtin.copy:
|
||||
content: '{{ logstash_full_config|to_yaml }}'
|
||||
dest: /etc/logstash/logstash.yml
|
||||
owner: root
|
||||
|
@ -44,7 +43,7 @@
|
|||
tags: logstash
|
||||
|
||||
- name: create patterns directory
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: /etc/logstash/patterns
|
||||
owner: root
|
||||
group: root
|
||||
|
@ -53,7 +52,7 @@
|
|||
tags: logstash
|
||||
|
||||
- name: copy patterns files
|
||||
copy:
|
||||
ansible.builtin.copy:
|
||||
content: '{{ item.value }}'
|
||||
dest: '/etc/logstash/patterns/{{ item.key }}.conf'
|
||||
owner: root
|
||||
|
@ -65,7 +64,7 @@
|
|||
tags: logstash
|
||||
|
||||
- name: copy input, output and filter files
|
||||
template:
|
||||
ansible.builtin.template:
|
||||
src: '{{ item }}.conf.j2'
|
||||
dest: '/etc/logstash/conf.d/{{ item }}.conf'
|
||||
owner: root
|
||||
|
@ -80,14 +79,14 @@
|
|||
tags: logstash
|
||||
|
||||
- name: install plugins
|
||||
logstash_plugin:
|
||||
community.general.logstash_plugin:
|
||||
name: '{{ item.name }}'
|
||||
state: '{{ item.state|default("present") }}'
|
||||
loop: '{{ logstash_plugins }}'
|
||||
tags: logstash
|
||||
|
||||
- name: enable and start service
|
||||
systemd:
|
||||
ansible.builtin.service:
|
||||
name: logstash
|
||||
state: started
|
||||
enabled: true
|
||||
|
|
Loading…
Reference in a new issue