Files
role-check-mk-agent/tasks/Windows.yml

32 lines
729 B
YAML
Raw Normal View History

2020-10-13 16:33:32 +13:00
---
- name: Ensure temp dir exists
win_file:
path: "c:/temp/"
state: directory
2020-10-13 23:40:02 +13:00
2021-06-04 13:06:44 +12:00
- name: Obtain information about a file
ansible.windows.win_stat:
path: "c:/temp/check-mk-agent.msi"
register: cmkmsi
2020-10-13 16:33:32 +13:00
- name: Retrieve copy of agent
win_get_url:
url: "{{ cmk_msi_agent }}{{ cmk_auth }}"
dest: "c:/temp/check-mk-agent.msi"
changed_when: false
2021-06-04 13:06:44 +12:00
when: not cmkmsi.stat.exists
2020-10-13 23:40:02 +13:00
2020-10-13 16:33:32 +13:00
- name: Ensure agent is installed
win_package:
path: "c:/temp/check-mk-agent.msi"
ignore_errors: yes
- name: Firewall rule to allow check_mk_agent on TCP port 6556
win_firewall_rule:
name: check_mk_agent
enabled: yes
state: present
localport: 6556
action: allow
direction: in
protocol: tcp