Ansible Module mount: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
 
(One intermediate revision by the same user not shown)
Line 11: Line 11:
Mount and unmount devices while synchronizing the corresponding /etc/fstab state.
Mount and unmount devices while synchronizing the corresponding /etc/fstab state.


=Example=
=Examples=
 
==Mount a Device and Add it to /etc/fstab==


<syntaxhighlight lang='yaml'>
<syntaxhighlight lang='yaml'>
- name: mount storage and update /etc/fstab
  mount:
    state: mounted
    path: /mnt/ebs0
    src: /dev/xvdb
    fstype: xfs
</syntaxhighlight>
</syntaxhighlight>

Latest revision as of 06:53, 12 December 2019

External

Internal

Overview

Mount and unmount devices while synchronizing the corresponding /etc/fstab state.

Examples

Mount a Device and Add it to /etc/fstab

- name: mount storage and update /etc/fstab
  mount:
    state: mounted
    path: /mnt/ebs0
    src: /dev/xvdb
    fstype: xfs