forked from celestiaorg/cosmos-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
02bf73b
commit 3b9dadd
Showing
6 changed files
with
420 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
|
||
#Note: You need to add LOGZIO_TOKEN variable with your API key. Like this: ansible-playbook -e LOGZIO_TOKEN=ABCXYZ123456 | ||
|
||
- hosts: all | ||
user: root | ||
any_errors_fatal: true | ||
gather_facts: no | ||
vars: | ||
- service: gaiad | ||
- JOURNALBEAT_BINARY: "{{lookup('env', 'GOPATH')}}/bin/journalbeat" | ||
roles: | ||
- logzio | ||
|
15 changes: 15 additions & 0 deletions
15
networks/remote/ansible/roles/logzio/files/journalbeat.service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[Unit] | ||
Description=journalbeat | ||
#propagates activation, deactivation and activation fails. | ||
Requires=network-online.target | ||
After=network-online.target | ||
|
||
[Service] | ||
Restart=on-failure | ||
ExecStart=/usr/bin/journalbeat -c /etc/journalbeat/journalbeat.yml -path.home /usr/share/journalbeat -path.config /etc/journalbeat -path.data /var/lib/journalbeat -path.logs /var/log/journalbeat | ||
Restart=always | ||
|
||
[Install] | ||
WantedBy=multi-user.target | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
|
||
- name: reload daemon | ||
command: "systemctl daemon-reload" | ||
|
||
- name: restart journalbeat | ||
service: name=journalbeat state=restarted | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
|
||
- name: Copy journalbeat binary | ||
copy: src="{{JOURNALBEAT_BINARY}}" dest=/usr/bin/journalbeat mode=0755 | ||
notify: restart journalbeat | ||
|
||
- name: Create folders | ||
file: "path={{item}} state=directory recurse=yes" | ||
with_items: | ||
- /etc/journalbeat | ||
- /etc/pki/tls/certs | ||
- /usr/share/journalbeat | ||
- /var/log/journalbeat | ||
|
||
- name: Copy journalbeat config | ||
template: src=journalbeat.yml.j2 dest=/etc/journalbeat/journalbeat.yml mode=0600 | ||
notify: restart journalbeat | ||
|
||
- name: Get server certificate for Logz.io | ||
get_url: "url=https://raw.githubusercontent.com/logzio/public-certificates/master/COMODORSADomainValidationSecureServerCA.crt force=yes dest=/etc/pki/tls/certs/COMODORSADomainValidationSecureServerCA.crt" | ||
|
||
- name: Copy journalbeat service config | ||
copy: src=journalbeat.service dest=/etc/systemd/system/journalbeat.service | ||
notify: | ||
- reload daemon | ||
- restart journalbeat | ||
|
Oops, something went wrong.