Commit b7318e43 authored by julian.gethmann's avatar julian.gethmann

NFS server and client role

* update commit-hook
* create server role nfs-server
* create client role lasarchiv
parent a72da4ea
...@@ -7,3 +7,4 @@ ...@@ -7,3 +7,4 @@
sha: c847dd3f2e7260830b6fc66a6a3ed7a837e3bdb1 sha: c847dd3f2e7260830b6fc66a6a3ed7a837e3bdb1
hooks: hooks:
- id: trailing-whitespace - id: trailing-whitespace
- id: check-added-large-files
---
nfs_server: 129.13.108.126
...@@ -5,6 +5,9 @@ las113.las.kit.edu ...@@ -5,6 +5,9 @@ las113.las.kit.edu
las93.las.kit.edu las93.las.kit.edu
las-gethmann.las.kit.edu las-gethmann.las.kit.edu
[nfs-hosts]
las126.las.kit.edu
[opera] [opera]
las113.las.kit.edu las113.las.kit.edu
# las114.las.kit.edu # las114.las.kit.edu
...@@ -83,6 +86,3 @@ las101.las.kit.edu ...@@ -83,6 +86,3 @@ las101.las.kit.edu
[cn] [cn]
las-bernhard.anka.kit.edu las-bernhard.anka.kit.edu
[simulation]
las126.las.kit.edu
- hosts: nfs-server
roles:
- nfs-server
tags: nfs-server
- hosts: las-archiv1
roles:
- lasarchiv
tags: nfs-clients
---
dependencies:
- { role: nfs-server }
---
- include: nfs.yml
---
- name: install requirements
dnf:
state: installed
name: nfs-utils
become: yes
when: ansible_distribution == 'Fedora'
- name: install requirements
apt:
state: installed
name: nfs-common
become: yes
when: ansible_distribution == 'Ubuntu'
- name: install requirements
yum:
state: installed
name: nfs-utils
become: yes
when: ansible_distribution == 'CentOS'
- name: mount lasarchiv1
mount:
name: "/mnt/las-archiv1"
src: "{{ nfs_server }}:/las-archiv1"
fstype: nfs4
opts: "soft,timeo=14,intr,nosuid"
state: mounted
become: yes
/las-archiv1 129.13.108.64/26(rw,sync,root_squash)
---
- name: reload firewall
service:
name: firewalld
state: reloaded
become: yes
- name: enable nfsd
service:
name: nfs
state: enabled
become: yes
- name: reload nfsd
service:
name: nfs
state: reloaded
become: yes
---
# https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux
- name: install dependencies
dnf:
state: installed
name: "{{ item }}"
with_items:
- rpcbind
- python-firewall
- name: copy export file
copy:
src: export
dest: /etc/export
backup: yes
mode: 0644
owner: root
group: root
notify:
- enable nfsd
- reload nfsd
- name: set firewall
firewalld:
port: "{{ item }}"
permanent: true
state: enabled
with_items:
- 2049/tcp
- 111/tcp
notify: reload firewall
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment