title: How does the mount module work in Ansible?
body: <p>What does the <code>mount</code> module do exactly?</p>
  
  <p>I have the following two steps in <code>shell</code>:</p>
  
  <pre><code>vi /etc/fstab
  #edit an already existing entry in the file. The path of this entry is: /
  
  mount -o remount /
  </code></pre>
  
  <p>I would like to perform these tasks on numerous machines thus I would like to use Ansible for the job. However I'm not sure Ansible performs the second step. Based on he documentation the <code>mount</code> module is rather an <code>fstab</code> editor. Or am I wrong?</p>
  
  <p>While testing I saw that Ansible in fact edited <code>fstab</code> as I wanted, but I'm not sure if it did a <code>remount</code> to "activate" the changes. Ansible code:</p>
  
  <pre><code>  - name: Add userquota to fstab
      mount:
        path: /
        state: present
        opts: errors=remount-ro,usrquota,grpquota
        fstype: ext4
        src: LABEL=cloudimg-rootfs
  </code></pre>
  
  <p>Is it enough in it self or do I need to perform he following step, too? Or does he previous step contains this command? Is it redundant or not?</p>
  
  <pre><code>  - name: Remount root filesystem
      shell: mount -o remount /
  </code></pre>