title: Ansible: Check disk size and create volume group according its size
body: <p>on 1st node sdb size is 1GB
  on 2nd node sdb size is 600M
  Just I couldn't check size of disk. I'm getting an error (Showing 0 value for size) when I execute the following playbook.</p>
  <pre class="lang-yaml prettyprint-override"><code>---
  - hosts: all
    become: yes
    tasks:
  
      - debug:
          msg: &quot;{{ ansible_devices.sdb.size }} is less than 800&quot;
        when:  ansible_devices.sdb.size|int  &lt; 800
  
  </code></pre>
  <hr />
  <pre><code>$ ansible-playbook lvm-new.yml
  
  ansible-playbook lvm-new.yml
  
  PLAY [all] ***********************************************************************************************************************************************************************
  
  TASK [Gathering Facts] ***********************************************************************************************************************************************************
  ok: [servera]
  ok: [serverb]
  
  TASK [debug] *********************************************************************************************************************************************************************
  ok: [serverb] =&gt; {
      &quot;msg&quot;: &quot;600.00 MB is less than 800&quot;
  }
  ok: [servera] =&gt; {
      &quot;msg&quot;: &quot;1.00 GB is less than 800&quot;
  }
  
  PLAY RECAP ***********************************************************************************************************************************************************************
  servera                    : ok=2    changed=0    unreachable=0    failed=0   
  serverb                    : ok=2    changed=0    unreachable=0    failed=0 
  </code></pre>
  <p>Can you assist to solve this task?</p>