Ansible/playbook/linux/elastic/config-win-metricbeat.yml
James Tombleson 0b96124696 Elastic configs for windows hosts is in progress
I am able to deploy metricbeat now to the windows hosts.  Looking at heartbeat again though.
2019-04-24 14:40:05 -07:00

40 lines
1.2 KiB
YAML

---
# This will install all the client parts needed for elastic to monitor client computers
- name: download metricbeat
win_get_url:
url: '{{ url_metricbeat }}'
dest: 'C:\temp\metricbeat-{{ elastic_version }}.zip'
force: no
- name: unzip heartbeat
win_unzip:
src: c:\temp\metricbeat-{{ elastic_version }}.zip
dest: C:\temp\metricbeat-{{ elastic_version }}\
creates: C:\temp\metricbeat-{{ elastic_version }}\
- name: Copy metricbeat-{{ elastic_version }} folder
win_command: powershell.exe copy-item -Path 'c:\temp\metricbeat-{{ elastic_version }}\metricbeat-{{ elastic_version }}-windows-x86_64\' -Filter * -Recurse -Destination 'C:\Program Files\Metricbeat\'
args:
creates: C:\Program Files\Metricbeat\
- name: Update template
win_template:
src: metricbeat.j2
dest: C:\Program Files\Metricbeat\metricbeat.yml
- name: Install Metricbeat service
win_command: powershell.exe -ExecutionPolicy ByPass -File install-service-metricbeat.ps1
args:
chdir: C:\program files\metricbeat\
- name: stop service
win_service:
name: metricbeat
state: stopped
- name: start service
win_service:
name: metricbeat
state: started