<h5 dir="auto">Issue Type:</h5>
<p dir="auto">Bug Report</p>
<h5 dir="auto">Ansible Version:</h5>
<p dir="auto">ansible 1.7 (devel <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/ansible/ansible/commit/189824dd76eb94574972fe54b390634854b2592d/hovercard" href="https://github.com/ansible/ansible/commit/189824dd76eb94574972fe54b390634854b2592d"><tt>189824d</tt></a>) last updated 2014/07/30 17:24:01 (GMT +200)</p>
<h5 dir="auto">Environment:</h5>
<p dir="auto">Ubuntu 12.04 LTS</p>
<h5 dir="auto">Summary:</h5>
<p dir="auto">The Mount Module is not idempotent if you are using an Bindmount with state=mounted.<br>
It mounts it on every run</p>
<h5 dir="auto">Steps To Reproduce:</h5>
<pre class="notranslate">- name: BIND MOUNT | /usr/local/jdk1.7 -&gt; /usr/lib/jvm/java-7-oracle
  mount: 
    name=/usr/local/jdk1.7
    src='/usr/lib/jvm/java-7-oracle' 
    fstype=none
    opts=bind
    state=mounted
</pre>
<p dir="auto">(No, i wont use Symlinks for this)</p>
<h5 dir="auto">Expected Results:</h5>
<p dir="auto">Correct checking of the Mount Status and just execute it once if neccessary</p>
<h5 dir="auto">Actual Results:</h5>
<p dir="auto">3x Run, 3x "Changed" -&gt;<br>
$ mount<br>
/usr/lib/jvm/java-7-oracle on /usr/local/jdk1.7 type none (rw,bind)<br>
/usr/lib/jvm/java-7-oracle on /usr/local/jdk1.7 type none (rw,bind)<br>
/usr/lib/jvm/java-7-oracle on /usr/local/jdk1.7 type none (rw,bind)</p>
<h5 dir="auto">Issue Type:</h5>
<p dir="auto">Bug Report</p>
<h5 dir="auto">Ansible Version:</h5>
<p dir="auto">ansible 1.5.4</p>
<h5 dir="auto">Environment:</h5>
<p dir="auto">Ansible is running from OS/X Mavericks 10.9.2<br>
I am managing an Ubuntu 12.04 instance</p>
<h5 dir="auto">Summary:</h5>
<p dir="auto">When using the mount module and specifying an option of "bind", the filesystem is mounted over and over. This has been tracked down to what appears to be Python's os.path.ismount(path) returning false for any mounts with the bind option applied.</p>
<h5 dir="auto">Steps To Reproduce:</h5>
<p dir="auto">Create a mount using the mount module with the following options:</p>
<ul dir="auto">
<li>fstype: none</li>
<li>opts: rw,bind</li>
<li>state: mounted</li>
</ul>
<h5 dir="auto">Expected Results:</h5>
<p dir="auto">I expect to see the mount point show up in /etc/fstab, the mount point to show when the command "mount" is ran in the terminal, and for the Ansible task to not show as "changed" for each run when no change has occurred.</p>
<h5 dir="auto">Actual Results:</h5>
<p dir="auto">The mount point shows up properly in /etc/fstab, but the mount point is mounted each time the Ansible task is ran, causing it to be mounted over and over on the system as well as for the Ansible task to show the status of "changed".</p>