title: check mount point usage using ansible
body: <p>I am trying to list the mount point that are used more than 50% using ansible. I am getting error on AWK. </p>
  
  <p>If I run this command individually it works</p>
  
  <pre><code>df -P | awk '$5 &gt;=90 {print}'
  Filesystem     1024-blocks     Used Available Capacity Mounted on
  tmpfs              2097152  1948868    148284      93% /tmp
  </code></pre>
  
  <p>or </p>
  
  <pre><code>df -P | grep /tmp | awk '$5 &gt;=90 {print}'
  tmpfs              2097152  1948832    148320      93% /tmp
  </code></pre>
  
  <p>If I put the same command in ansible shell it fails</p>
  
  <p>Here:</p>
  
  <pre><code>ansible all -i &lt;hostname&gt;, -m shell -a "df -P | grep /tmp | awk '$5 &gt;=90 {print}'"
  SSH password:
  SUDO password[defaults to SSH password]:
  &lt;hostname&gt; | FAILED | rc=1 &gt;&gt;
  awk:  &gt;=90 {print}
  awk:  ^ syntax error
  grep: write error: Broken pipe
  </code></pre>
  
  <p>Is there a way to do this? Is there a better way to do this? may be using the factors?</p>