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