IT3110 @ utahtech
Assignment
This assignment will hone your system automation skills with ansible.
If you are using terraform to create your machines, they need to be able to speak NFS to each other so you will need to open the security group to udp and tcp 2049. (Change your terraform file)
Tasks
nfsserver
. The other 2 can be in a group called clients
.In particular, it should do the following:
nfs-kernel-server
is installed on the NFS server machine. (the one in the nfsserver
group). You likely will have to update packages to install this./ansible_shares/fruit
directory on your nfs server./etc/exports
on your nfs server using the lineinfile
module.
/ansible_shares/fruit *(rw,sync,no_subtree_check)
nfs-common
is installed on the client machines./nfs_share/fruits
. You will probably also have to have ansible create that directory. Look for the mount module. The remote machine will be the ip of your nfs server
. The remote share is /ansible_shares_fruit
.To verify that everything is working and that the new share is mounted, you can manually do a df
on the client machines after your playbook has executed.
If you get stuck, I have recreated the server one here. Here is my inventory file.
You run the playbook like ansible-playbook -i inventory soln.yml -K
.