Skip to content
Snippets Groups Projects
Commit 3102f178 authored by Chris Hines's avatar Chris Hines
Browse files

Merge branch 'simonNFSFix' into 'master'

Simon nfs fix

Fix whitespace issue with nfs client (not sure why this should be a bug)
Fix nfs enable but in nfs-server

See merge request !43
parents 1f02edb8 a7b04785
No related branches found
No related tags found
No related merge requests found
...@@ -5,7 +5,13 @@ ...@@ -5,7 +5,13 @@
with_items: with_items:
- libnfsidmap - libnfsidmap
- nfs-utils - nfs-utils
- nfs-utils-lib
when: ansible_os_family == "RedHat" and ansible_distribution_major_version == "7" when: ansible_os_family == "RedHat" and ansible_distribution_major_version == "7"
- name: install dependencies
yum: name={{ item }} state=installed
sudo: true
with_items:
- nfs-utils-lib
when: ansible_os_family == "RedHat" and ansible_distribution_major_version < "7"
- include: mountFileSystem.yml - include: mountFileSystem.yml
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
when: nfsMounts is defined when: nfsMounts is defined
- name: "Mounting NFS mounts" - name: "Mounting NFS mounts"
mount: name={{ item.name }} src="{{ item.ipv4 }}:{{ item.src }} " fstype={{ item.fstype }} opts={{ item.opts }} state=mounted mount: name={{ item.name }} src="{{ item.ipv4 }}:{{ item.src }}" fstype={{ item.fstype }} opts={{ item.opts }} state=mounted
with_items: "{{ nfsMounts }}" with_items: "{{ nfsMounts }}"
notify: "restart rpcbind" notify: "restart rpcbind"
notify: "restart idmap" notify: "restart idmap"
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
when: firstMount | failed when: firstMount | failed
- name: "Mounting NFS mounts after failure" - name: "Mounting NFS mounts after failure"
mount: name={{ item.name }} src=" {{ item.ipv4 }}:{{ item.src }} " fstype={{ item.fstype }} opts={{ item.opts }} state=mounted mount: name={{ item.name }} src="{{ item.ipv4 }}:{{ item.src }}" fstype={{ item.fstype }} opts={{ item.opts }} state=mounted
with_items: "{{ nfsMounts }}" with_items: "{{ nfsMounts }}"
notify: "restart idmap" notify: "restart idmap"
notify: "restart rpcbind" notify: "restart rpcbind"
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
file: dest={{ item.src }} state=directory mode=755 owner=root group=root file: dest={{ item.src }} state=directory mode=755 owner=root group=root
sudo: true sudo: true
with_items: "{{ exportList }}" with_items: "{{ exportList }}"
ignore_errors: true
- name: "Starting rpcbind" - name: "Starting rpcbind"
service: "name=rpcbind state=started enabled=true" service: "name=rpcbind state=started enabled=true"
...@@ -10,10 +11,19 @@ ...@@ -10,10 +11,19 @@
when: ansible_os_family == "RedHat" when: ansible_os_family == "RedHat"
- name: "Start the Server" - name: "Start the Server"
service: "name=nfs state=started enabled=true" service: "name=nfs state=started"
sudo: true sudo: true
when: ansible_os_family == "RedHat" when: ansible_os_family == "RedHat"
- name: "Enable the Server at boot"
service: "name=nfs enabled=true"
sudo: true
when: ansible_os_family == "RedHat" and ansible_distribution_major_version < "7"
- name: "Enable the Server at boot"
service: "name=nfs-server.service enabled=true"
sudo: true
when: ansible_os_family == "RedHat" and ansible_distribution_major_version == "7"
- name: "Start the Server" - name: "Start the Server"
service: "name=nfs-kernel-server state=started enabled=true" service: "name=nfs-kernel-server state=started enabled=true"
sudo: true sudo: true
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment