diff --git a/tasks/Windows.yml b/tasks/Windows.yml index d414539..3510d94 100644 --- a/tasks/Windows.yml +++ b/tasks/Windows.yml @@ -4,11 +4,17 @@ path: "c:/temp/" state: directory +- name: Obtain information about a file + ansible.windows.win_stat: + path: "c:/temp/check-mk-agent.msi" + register: cmkmsi + - name: Retrieve copy of agent win_get_url: url: "{{ cmk_msi_agent }}{{ cmk_auth }}" dest: "c:/temp/check-mk-agent.msi" changed_when: false + when: not cmkmsi.stat.exists - name: Ensure agent is installed win_package: