A role to manage autofs mounts.
Set hash_behaviour=merge
in your ansible.cfg file.
For NFS mounts, install nfs-utils
on RedHat family systems and nfs-common
on Debian family systems.
Default is False
. Set to True
to actually run the role.
A dictionary of mounts.
The configuration for the mount that goes in /etc/auto.master
.
The configuration for the mount that goes in /etc/auto.misc
.
Use the aspects_autofs_master_line_default
value in /etc/auto.master
or not.
A default line to place in the /etc/auto.master
configuration file. Defaults to: /- /etc/auto.misc --timeout 60
aspects_packages is used to manage system packages.
- hosts: servers
vars:
aspects_autofs_mounts:
userhome:
masterline: "/home /etc/auto.misc --timeout 60"
miscline: "user -hard,intr,tcp,actimeo=3 nfsserver:/homedata/user"
roles:
- { role: aspects_autofs }
On CentOS 7, if you are using NFS home mounts, you may need to modify SELinux settings. Specificially, run:
setsebool -P use_nfs_home_dirs 1
I discovered this when ssh was returning a public key error when I tried to ssh in using ssh keys.
MIT