2
0
Fork 0
This role is NO LONGER SUPPORTED, please take a look to DebOps mount and nfs roles
This repository has been archived on 2020-11-04. You can view files and clone it, but cannot push or open issues or pull requests.
Go to file
Jeremy Gardais 9950a0c410 Version 1.0.1 2018-01-04 12:03:42 +01:00
defaults Manage /etc/fstab entry. 2017-07-21 15:20:07 +02:00
handlers Restart systemd *-fs.target. 2017-07-21 15:35:34 +02:00
meta improved documentation 2017-10-03 16:02:21 +02:00
tasks Restart systemd *-fs.target. 2017-07-21 15:35:34 +02:00
tests Add all needed files for ansible-galaxy. 2017-07-24 09:01:32 +02:00
vars Add all needed files for ansible-galaxy. 2017-07-24 09:01:32 +02:00
.travis.yml Add all needed files for ansible-galaxy. 2017-07-24 09:01:32 +02:00
CHANGELOG.md Version 1.0.1 2018-01-04 12:03:42 +01:00
README.md improved documentation 2017-10-03 16:02:21 +02:00

README.md

Mounts

  1. Overview
  2. Role Variables
  3. Example Playbook
  4. Configuration
  5. Development
  6. License
  7. Author Information

Overview

This role manages static mounts of local and remote devices.

Role Variables

  • mounts_list: dictionary that must contain the following information about devices to mount :
  • mounts_list.name: The path to the mountpoint.
  • mounts_list.src: Path to the local or remove device.
  • mounts_list.fstype: Device filesystem type.
  • mounts_list.opts: Mount options [default: defaults,noatime].
  • mounts_list.state: If the device should be 'mounted', 'present',… [default: present].

Example Playbook

  • Use defaults vars:
- hosts: serverXYZ
  roles:
    - role: ipr-cnrs.mounts
      mounts_list:
        - name: /mnt/storage
          src: 'nfs-share.domain.org:/mnt/share'
          fstype: nfs4
          opts: 'defaults,x-systemd.automount,x-systemd.device-timeout=2,x-systemd.idle-timeout=1min,noatime,noauto'
          state: mounted

Configuration

This role will:

  • Create the mountpoint directory.
  • Add an entry in /etc/fstab.
  • Ensure to mount the device if specified.
  • Restart systemd's filesystem.target to ensure automount device works.

Development

This source code comes from our Gogs instance and the Github repo exist just to be able to send the role to Ansible Galaxy…

But feel free to send issue/PR here :)

Thanks to this hook, Github automatically got updates from our Gogs instance :)

License

WTFPL

Author Information

Jérémy Gardais