You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
1.5 KiB
36 lines
1.5 KiB
---
|
|
|
|
- name: Make sure nfs-utils is installed
|
|
yum: name=nfs-utils state=installed
|
|
|
|
- name: set virt_use_nfs to 1
|
|
command: setsebool -P virt_use_nfs 1
|
|
|
|
- name: Create a directory for NFS storage
|
|
file: path=/openshift-storage state=directory owner=nfsnobody group=nfsnobody mode=0777
|
|
|
|
- name: Fill /etc/exports
|
|
template: dest=/etc/exports src=exports
|
|
|
|
- name: Start nfs-server
|
|
service: name=nfs-server state=started enabled=yes
|
|
|
|
- name: Add an iptable rule to allow port 2049 (tcp) from other hosts
|
|
lineinfile: dest=/etc/sysconfig/iptables regexp="^-A INPUT -p tcp .*--dport 2049" line="-A INPUT -p tcp -m state --state NEW -m tcp --dport 2049 -j ACCEPT" insertafter="-A INPUT -i lo -j ACCEPT"
|
|
tags: iptables
|
|
|
|
- name: Add an iptable rule to allow port 2049 (udp) from other hosts
|
|
lineinfile: dest=/etc/sysconfig/iptables line="-A INPUT -p udp --dport 2049 -j ACCEPT" insertafter="-A INPUT -i lo -j ACCEPT"
|
|
tags: iptables
|
|
|
|
- name: Add an iptable rule to allow port 111 (tcp) from other hosts
|
|
lineinfile: dest=/etc/sysconfig/iptables regexp="^-A INPUT -p tcp .*--dport 111" line="-A INPUT -p tcp -m state --state NEW -m tcp --dport 111 -j ACCEPT" insertafter="-A INPUT -i lo -j ACCEPT"
|
|
tags: iptables
|
|
|
|
- name: Add an iptable rule to allow port 111 (udp) from other hosts
|
|
lineinfile: dest=/etc/sysconfig/iptables line="-A INPUT -p udp --dport 111 -j ACCEPT" insertafter="-A INPUT -i lo -j ACCEPT"
|
|
tags: iptables
|
|
|
|
- name: Restart iptables
|
|
service: name=iptables enabled=yes state=restarted
|
|
tags: iptables
|
|
|