templier-ansible/roles/home/tasks/main.yml
Yohann D'ANELLO 3fedc63db3
Mount home directories
Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>
2021-05-24 20:51:07 +02:00

32 lines
579 B
YAML

---
- name: Install NFS client
apt:
update_cache: true
name:
- nfs-common
state: present
register: apt_result
retries: 3
until: apt_result is succeeded
- name: Create directory home
file:
path: /home
state: directory
owner: root
group: user
mode: 0750
- name: Deploy nfs systemd mount
template:
src: systemd/system/home.mount.j2
dest: /etc/systemd/system/home.mount
mode: 0644
- name: Load and activate nfs systemd mount
systemd:
name: home.mount
daemon_reload: true
enabled: true
state: started