Member-only story
NFS Server — Export an NFS Share in RedHat-like systems — Ansible modules yum, file, lineinfile, command, firewalld, service
How to automate the configuration of an NFS Server with Ansible in six tasks: install packages, create the NFS share directory, add share in the config, export shares, restart NFS service and enable on boot, and open firewall service ports on boot in a RedHat-like Linux target system: RedHat Enterprise Linux, CentOS, CentOS Stream, Fedora, ClearOS, Oracle Linux, EuroLinux, Fermi Linux, EulerOS, ROSA Linux, Springdale Linux, Asianux.
6 min readNov 28, 2021
How to export NFS Share in RedHat-like Linux systems with Ansible?
I’m going to show you a live demo with some simple Ansible code.
I’m Luca Berton and welcome to today’s episode of Ansible Pilot.
Export an NFS Share in RedHat-like systems
- install packages =>
ansible.builtin.yum