Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Javier Franco
/
elk_installation
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
189a9c13
authored
2022-08-12 11:29:59 -0400
by
Gustavo Calcaterra
Committed by
Javier Franco
2022-08-12 11:34:00 -0400
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Add conditionals to enable system module for idempotency purposes
1 parent
9a7873c8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
4 deletions
roles/beat/tasks/main.yml
roles/beat/tasks/main.yml
View file @
189a9c1
...
...
@@ -15,7 +15,7 @@
-
name
:
Test {{ beat_name }} connection
shell
:
'
{{
beat_name
}}
test
output'
register
:
result
changed_when
:
"
result.rc
!=
0"
changed_when
:
False
-
name
:
Test connection output
debug
:
...
...
@@ -26,15 +26,29 @@
daemon_reload
:
yes
when
:
ansible_distribution_major_version >= "7"
-
name
:
Configure system module of {{ beat_name }}
shell
:
'
{{
beat_name
}}
modules
enable
system'
-
name
:
Verify if system module of {{ beat_name }} is enabled
shell
:
'
{{
beat_name
}}
modules
list
|
grep
-i
system'
ignore_errors
:
yes
#when: modules == 'yes'
when
:
( beat_name == "metricbeat") or
( beat_name == "filebeat")
register
:
verify_system_result
changed_when
:
False
-
name
:
Configure system module of {{ beat_name }}
shell
:
'
{{
beat_name
}}
modules
enable
system'
#when: modules == 'yes'
when
:
-
( beat_name == "metricbeat") or ( beat_name == "filebeat")
-
"
verify_system_result.rc
!=
0"
register
:
result
changed_when
:
"
'Module
system
is
already
enabled'
not
in
result.stdout"
-
name
:
Run {{ beat_name }} setup and dashboard config on kibana
shell
:
'
{{
beat_name
}}
setup'
ignore_errors
:
yes
register
:
result
changed_when
:
"
result.rc
!=
0"
ignore_errors
:
True
-
name
:
Start {{ beat_name }} service
service
:
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment