Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stuttgart-things/install-configure-nfs
manage a nfs client and server
https://github.com/stuttgart-things/install-configure-nfs
Last synced: 2 days ago
JSON representation
manage a nfs client and server
- Host: GitHub
- URL: https://github.com/stuttgart-things/install-configure-nfs
- Owner: stuttgart-things
- Created: 2023-03-10T13:38:43.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-01T13:26:14.000Z (about 1 year ago)
- Last Synced: 2023-09-02T10:28:53.855Z (about 1 year ago)
- Language: Jinja
- Size: 20.5 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# stuttgart-things/install-configure-nfs
This ansible role can set up an NFS server or a client. It can automatically create nfs mounts for clients and also install and configure a server.## Example playbooks to use this role
Install this role on your ansible host
```
cat < /tmp/requirements.yaml
roles:
- src: [email protected]:Lab/stuttgart-things/supporting-roles/install-requirements.git
scm: git
- src: [email protected]:Lab/stuttgart-things/supporting-roles/install-configure-nfs.git
scm: git
- src: [email protected]:Lab/stuttgart-things/supporting-roles/download-install-binary
scm: git
collections:
- name: community.general
version: 6.3.0
- name: ansible.posix
version: 1.5.1
EOF
ansible-galaxy install -r /tmp/requirements.yaml --force
```Example playbook for an nfs client installation with mount on a netapp
```
- hosts: all
gather_facts: true
become: true
vars:
kind: clientnfs_mnt:
- name: archive
permanent: true #false makes no fstab entry
need_nfs_subfolder: false
remote_uri: smt-final-2.labul.sva.de:/archive
mount_dir: /archive
permissions: 777roles:
- install-configure-nfs
```**Note: This role requires become yes**
Example playbook for an nfs server installation with export configuration
```
- hosts: "nfs"
gather_facts: true
become: true
vars:
kind: server
permanent: true
nfs_manage_firewall: true
#nfs_custom_exports: #optional use this or nfs_export_path
# - / *(ro,fsid=0) #You can specify more mounts at one time
# - /var/lib/docker *(rw,sync,nohide)
nfs_export_path: #optional use this or nfs_custom_exports
- /srv/nfsroles:
- install-configure-nfs
```
**Note: This role requires become yes**Example inventory
```
[nfs]
foo.bar.example.com ansible_user=foobar
```Execute playbook
```
ansible-playbook -i inventory install-configure-nfs.yml
```## Role TODOs
## Variables
This role need variables
1. NFS Server
- kind: (client / server) Client or server installation
- permanent: (true [default] / false) save changes after reboot
- nfs_manage_firewall: (true [default] / false)
- nfs_exports: (string) exportfs entry
- remote_uri:2. NFS Client
- kind: (client / server) Client or server installation
- permanent: (true [default] / false) save changes after reboot
- remote_uri: (string) nfs uri
- mount_dir: (string) path for mount nfs
## Requirements and Dependencies:
Server and client:
- Ubuntu 20.04
- Ubuntu 18.04
- CentOS 8
- CentOS 7Role history
----------------
| date | who | changelog |
|---|---|---|
|2021-28-10 | Marcel Zapf | add NetApp support, added dict in mount creation logic, added support for creating nfs subdirs
|2021-28-02 | Patrick Hermann | updated role structure, doc and requirements
|2020-07-07 | Marcel Zapf | intial commit for this roleLicense
-------BSD
Author Information
------------------Marcel Zapf; 08/2020; SVA GmbH