# win\_package and check\_mode

**URL:** <https://forum.ansible.com/t/win-package-and-check-mode/29747>\
**Category:** Ansible Project\
**Created:** [February 22, 2019, 4:40pm UTC](https://forum.ansible.com/t/win-package-and-check-mode/29747 "2019-02-22T16:40:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Igor\_Turovsky](https://avatars.discourse-cdn.com/v4/letter/i/cdc98d/32.png) [@Igor\_Turovsky](https://forum.ansible.com/u/Igor_Turovsky)\
**Post date:** [February 22, 2019, 4:40pm UTC](https://forum.ansible.com/t/win-package-and-check-mode/29747/1 "2019-02-22T16:40:35Z")

</div>

Hello,

I have a question about running win\_package in check\_mode.

My playbook (part of it):

- name: Copy Splunk Forwarder MSI  
win\_copy:  
src: “{{ splunk\_forwarder\_distro }}”  
dest: “{{ splunk\_forwarder\_distro\_local }}”  
force: yes  
remote\_src: no

- name: Install Splunk Forwarder  
win\_package:  
expected\_return\_code: 0,3010  
state: present  
arguments: “{{ splunk\_forwarder\_arguments }}”  
path: “{{ splunk\_forwarder\_distro\_local }}”

When I run it in check\_mode, the first task will work correctly and say that it would copy the file.  
The second task fails since the file in path is missing.

I do not want to set _check\_mode:no_ for the first task and copy the file in check\_mode just to have win\_package working.

What is the best way to make win\_package working in check\_mode if the file in path is missing?

Thank you,

- Igor
