2018-08-06 15:58:05 +02:00
# NO LONGER SUPPORTED, please take a look to [debops.console role][github debops console] !
2017-07-21 14:48:43 +02:00
1. [Overview ](#overview )
2. [Role Variables ](#role-variables )
3. [Example Playbook ](#example-playbook )
4. [Configuration ](#configuration )
5. [Development ](#development )
5. [License ](#license )
6. [Author Information ](#author-information )
## Overview
2017-10-03 16:02:21 +02:00
This role manages static mounts of local and remote devices.
2017-07-21 14:48:43 +02:00
## Role Variables
2017-10-03 16:02:21 +02:00
* **mounts_list** : dictionary that must contain the following information about devices to mount :
2017-07-21 14:48:43 +02:00
* **mounts_list.name** : The path to the mountpoint.
2017-07-21 15:20:07 +02:00
* **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` ].
2017-07-21 14:48:43 +02:00
## Example Playbook
* Use defaults vars :
``` yml
- hosts: serverXYZ
roles:
- role: ipr-cnrs.mounts
2017-07-21 15:47:40 +02:00
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
2017-07-21 14:48:43 +02:00
```
## Configuration
This role will :
* Create the mountpoint directory.
2017-07-21 15:20:07 +02:00
* Add an entry in `/etc/fstab` .
* Ensure to mount the device if specified.
2017-07-21 15:35:34 +02:00
* Restart systemd's filesystem.target to ensure automount device works.
2017-07-21 14:48:43 +02:00
## Development
This source code comes from our [Gogs instance][mounts source] and the [Github repo][mounts github] exist just to be able to send the role to Ansible Galaxy…
But feel free to send issue/PR here :)
Thanks to this [hook][gogs to github hook], Github automatically got updates from our [Gogs instance][mounts source] :)
## License
[WTFPL][wtfpl website]
## Author Information
Jérémy Gardais
* Source : [on IPR's Gogs][mounts source]
* [IPR][ipr website] (Institut de Physique de Rennes)
[vars directory]: ./vars
[gogs to github hook]: https://stackoverflow.com/a/21998477
[mounts source]: https://git.ipr.univ-rennes1.fr/cellinfo/ansible.mounts
[mounts github]: https://github.com/ipr-cnrs/mounts
[wtfpl website]: http://www.wtfpl.net/about/
[ipr website]: https://ipr.univ-rennes1.fr/
2018-08-06 15:58:05 +02:00
[github debops console]: https://github.com/debops/debops/tree/master/ansible/roles/debops.console