diff --git a/elk_metrics_6x/installJournalbeat.yml b/elk_metrics_6x/installJournalbeat.yml index 1811596f..4e3b10be 100644 --- a/elk_metrics_6x/installJournalbeat.yml +++ b/elk_metrics_6x/installJournalbeat.yml @@ -109,14 +109,17 @@ with_items: - "/usr/share/journalbeat" - "/var/lib/journalbeat" - - "/var/log/journalbeat" - "/etc/journalbeat" - name: Install journalbeat shell: /opt/go1.10.1/go/bin/go get -v github.com/mheese/journalbeat + args: + creates: /usr/local/bin/journalbeat environment: PATH: "{{ ansible_env.PATH }}:/opt/go1.10.1/go/bin" GOPATH: /usr/local + notify: + - Enable and restart journalbeat - name: Drop journalbeat conf file template: @@ -125,6 +128,8 @@ with_items: - src: templates/journalbeat.yml.j2 dest: /etc/journalbeat/journalbeat.yml + notify: + - Enable and restart journalbeat - name: Run the systemd service role include_role: @@ -140,7 +145,7 @@ -path.home /usr/share/journalbeat -path.config /etc/journalbeat -path.data /var/lib/journalbeat - -path.logs /var/log/journalbeat + -path.logs /var/log/beats config_overrides: Service: EnvironmentFile: "-/etc/default/go1.10.1" @@ -149,6 +154,7 @@ Wants: network-online.target After: network-online.target + handlers: - name: Enable and restart journalbeat systemd: name: "journalbeat"