Przeglądaj źródła

Remove extra nfs configuration.

Andrew Butcher 9 lat temu
rodzic
commit
657f5d2bed

+ 0 - 8
roles/openshift_storage_nfs/defaults/main.yml

@@ -12,11 +12,3 @@ os_firewall_use_firewalld: False
 os_firewall_allow:
 - service: nfs
   port: "2049/tcp"
-- service: portmapper
-  port: "111/tcp"
-- service: mount lock daemon
-  port: "20048/tcp"
-- service: status
-  port: "50825/tcp"
-- service: frsrpc
-  port: "53248/tcp"

+ 3 - 10
roles/openshift_storage_nfs/tasks/main.yml

@@ -7,20 +7,13 @@
 - name: Configure NFS
   lineinfile:
     dest: /etc/sysconfig/nfs
-    regexp: "{{ item.regex }}"
-    line: "{{ item.line }}"
-  register: nfs_config
-  with_items:
-  - regex: '^RPCNFSDARGS=.*$'
+    regexp: '^RPCNFSDARGS=.*$'
     line: 'RPCNFSDARGS="-N 2 -N 3"'
-  - regex: '^RPCMOUNTDOPTS=.*$'
-    line: 'RPCMOUNTDOPTS="-p 20048"'
-  - regex: '^STATDARG=.*$'
-    line: 'STATDARG="-p 50825"'
+  register: nfs_config
 
 - name: Restart nfs-config
   service: name=nfs-config state=restarted
-  when: "True in (nfs_config.results | oo_collect(attribute='changed') | list)"
+  when: nfs_config | changed
 
 - name: Ensure exports directory exists
   file: