Skip to content

Commit

Permalink
Open firewall for local NFS server
Browse files Browse the repository at this point in the history
  • Loading branch information
milliams committed Aug 25, 2023
1 parent e9e303c commit f9b5637
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
5 changes: 5 additions & 0 deletions roles/filesystem/handlers/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,8 @@

- name: Re-export shares
ansible.builtin.command: exportfs -rav # noqa no-changed-when

- name: Restart firewalld
ansible.builtin.service:
name: firewalld
state: restarted
11 changes: 11 additions & 0 deletions roles/filesystem/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@
name: nfs-server
state: started
enabled: true
when: slurm_role == "mgmt" and ansible_local.citc.csp == "openstack"

- name: Create shared FS
ansible.builtin.file:
path: /shared
state: directory
mode: o=rwx,g=rx,o=rx
when: slurm_role == "mgmt" and ansible_local.citc.csp == "openstack"

# TODO mount a Cinder volume
- name: Config nfs server
Expand All @@ -20,9 +22,18 @@
notify:
- Reload nfs-server
- Re-export shares
when: slurm_role == "mgmt" and ansible_local.citc.csp == "openstack"

- name: Open NFS port in firewall
ansible.posix.firewalld:
port: 2049
permanent: true
state: enabled
notify: Restart firewalld

- name: Flush handlers
ansible.builtin.meta: flush_handlers
when: slurm_role == "mgmt" and ansible_local.citc.csp == "openstack"

- name: Install nfs-utils
ansible.builtin.yum:
Expand Down

0 comments on commit f9b5637

Please sign in to comment.