commit cf9826529350719d49653b7ce36914c8ac3406d1 Author: Gardais Jérémy Date: Fri Jul 21 14:48:43 2017 +0200 Create mountpoint directory. diff --git a/README.md b/README.md new file mode 100644 index 0000000..2dc7cdd --- /dev/null +++ b/README.md @@ -0,0 +1,58 @@ +# Mounts + +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 + +Manage to mount local and remote devices. + +## Role Variables + +* **mounts_list** : Directory that must contains all informations about devices to mount. +* **mounts_list.name** : The path to the mountpoint. + +## Example Playbook + +* Use defaults vars : + +``` yml +- hosts: serverXYZ + roles: + - role: ipr-cnrs.mounts +``` + +## Configuration + +This role will : +* Create the mountpoint directory. + +## 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/ diff --git a/defaults/main.yml b/defaults/main.yml new file mode 100644 index 0000000..62a4fcd --- /dev/null +++ b/defaults/main.yml @@ -0,0 +1,9 @@ +--- +# defaults file for 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 diff --git a/tasks/main.yml b/tasks/main.yml new file mode 100644 index 0000000..9e8ca18 --- /dev/null +++ b/tasks/main.yml @@ -0,0 +1,8 @@ +--- +# tasks file for mounts + +- name: Create mount directories + file: + path: "{{ item.name }}" + state: directory + with_items: "{{ mounts_list }}"