vn-ansible/roles/debian-qemu/tasks/autofs.yml

38 lines
850 B
YAML
Raw Normal View History

2024-09-24 07:45:24 +00:00
- name: Install autofs packages
apt:
name: "{{ item }}"
state: present
with_items:
- nfs-common
- autofs
- libnfs-utils
- autofs-ldap
- name: Create homes directory
file:
2024-09-24 07:45:24 +00:00
path: "{{ homes_path }}"
state: directory
mode: '0755'
- name: Configure nsswitch for autofs
lineinfile:
path: /etc/nsswitch.conf
line: "automount: files"
notify: restart-nslcd
- name: Add file homes.autofs configured to autofs
template:
2024-09-24 07:45:24 +00:00
src: homes.autofs
dest: /etc/auto.master.d/homes.autofs
owner: root
group: root
mode: '0644'
- name: Add file /etc/auto.homes configured to the systemd
template:
2024-09-24 07:45:24 +00:00
src: auto.homes
dest: /etc/auto.homes
owner: root
group: root
mode: '0644'
notify: restart-autofs
- name: Service autofs service
2024-09-23 12:30:38 +00:00
service:
name: autofs
2024-09-24 07:45:24 +00:00
enabled: yes