Installing VMware Tools on virtual machines using Ansible
<p>I am trying to install VMware Tools on various OS on my guest machines. This is the code I have now.</p>

<pre><code>---
- hosts: all

  tasks:
        -   name: debian | installing open-vm-tools
            apt: name=open-vm-tools state=present
            when: ansible_os_family == "Debian"

        -   name: install vmware tools via Chocolatey
            win_chocolatey: name=vmware-tools state=present
            when: ansible_distribution  == "Windows"
</code></pre>

<p>This is what my hosts.ini file looks like:</p>

<pre><code>[my-host]
myhost.com  ansible_ssh_pass=mypw ansible_ssh_user=root
</code></pre>

<p>This is the command I am using to run it. Which works.</p>

<pre><code>ansible-playbook -i hosts.ini vmwaretools.yml
</code></pre>

<p>However, this is the message I get after I run it.</p>

<blockquote>
  <p>ok: [myhost.com]<br>
  TASK [debian | installing open-vm-tools]
  *************************************** task path: /Users/Desktop/Ansible/vmwaretools.yml:5 skipping:
  [myhost.com] => {"changed": false, "skip_reason":
  "Conditional check failed", "skipped": true}</p>
  
  <p>TASK [install vmware tools via Chocolatey]
  ************************************* task path: /Users/Desktop/Ansible/vmwaretools.yml:9 skipping:
  [myhost.com] => {"changed": false, "skip_reason":
  "Conditional check failed", "skipped": true}</p>
  
  <p>PLAY RECAP
  ********************************************************************* myhost.com : ok=1    changed=0    unreachable=0<br>
  failed=0</p>
</blockquote>

<p>Why does it say conditional fail checked? I am sure I have VMs with Debian and Windows running. Any idea why this is happening?</p>