cmprescott.autofs
Ansible Role: autofs
This role installs and sets up autofs.
Requirements
# You need Ansible version 1.4.4 or higher
ansible --version
# Operating System
case $OSTYPE in
# For Linux, you need either apt, yum, dnf, or zypper
"linux"*)
apt --version || yum --version || dnf --version || zypper --version;;
# For OS X, no additional requirements
"darwin"*)
echo autofs is available out of the box;;
esac
Role Variables
# --- Configuration for autofs ---
autofs_indirect_maps:
- name: autofs.nfs
path: /mnt/nfs
mark: "There to ensure actions are repeatable"
options: "--timeout=30 --ghost"
mounts:
- name: "isos"
fstype: "nfs,rw,bg,hard,intr,tcp,resvport"
url: "nfs.server.com:/data/isos"
# --- OS setup ---
# No need to change this
autofs_pkgs:
Linux: [ 'autofs' ]
Darwin: []
# --- OS configuration ---
# No need to change this
autofs_master:
Linux: "/etc/auto.master"
Darwin: "/etc/auto_master"
Dependencies
None.
Example Playbook
- name: "Media Client"
hosts: clients.media
roles:
- name: "Media Client | NFS | ensure automounts"
become: true
become_method: sudo
role: cmprescott.autofs
autofs_indirect_maps:
- name: "auto.nfs-nas"
path: "/mnt/nfs"
mark: "NFS mounts from NAS"
options: "--timeout=30 --ghost"
mounts:
- name: "movies"
fstype: "nfs,rw,bg,hard,intr,tcp,resvport"
url: "nfs.server.com:/data/movies"
- name: "tv"
fstype: "nfs,rw,bg,hard,intr,tcp,resvport"
url: "nfs.server.com:/data/tv"
- name: "auto.nfs-other"
path: "/-"
mark: "NFS mount using root base"
options: "--timeout=30 --ghost"
mounts:
- name: "/var/remotedir"
fstype: "nfs,rw,bg,hard,intr,tcp,resvport"
url: "nfs.server.com:/data/remotedir"
License
BSD
Author Information
Prescott Chris
Informazioni sul progetto
Installs and configures autofs.
Installa
ansible-galaxy install cmprescott.autofs
Licenza
Unknown
Download
21.6k
Proprietario