62 lines
1.3 KiB
YAML
62 lines
1.3 KiB
YAML
---
|
|
|
|
- name: Installing client packages
|
|
apt:
|
|
name: '{{ item }}'
|
|
state: latest
|
|
with_items:
|
|
- nfs-common
|
|
- libnss-ldap
|
|
|
|
- name: Create directory for user homes
|
|
file: path=/var/lib/nethserver/home state=directory owner=root group=root mode=0755
|
|
|
|
- name: Add mount to fstab
|
|
mount:
|
|
path: /var/lib/nethserver/home
|
|
src: "{{ esmith.SystemName }}.{{ esmith.DomainName }}:/var/lib/nethserver/home"
|
|
fstype: nfs4
|
|
opts: rw,async,_netdev
|
|
passno: 1
|
|
dump: 0
|
|
state: mounted
|
|
|
|
# forse questo non serve
|
|
- name: Tweak idmap.conf
|
|
ini_file:
|
|
path: /etc/idmapd.conf
|
|
section: Translation
|
|
option: Method
|
|
value: nsswitch
|
|
mode: 0644
|
|
|
|
- name: nsswitch settings for passwd
|
|
lineinfile:
|
|
path: /etc/nsswitch.conf
|
|
state: present
|
|
regexp: '^passwd\:'
|
|
line: 'passwd: files ldap'
|
|
|
|
- name: nsswitch settings for group
|
|
lineinfile:
|
|
path: /etc/nsswitch.conf
|
|
state: present
|
|
regexp: '^group\:'
|
|
line: 'group: files ldap'
|
|
|
|
- name: nsswitch settings for shadow
|
|
lineinfile:
|
|
path: /etc/nsswitch.conf
|
|
state: present
|
|
regexp: '^shadow\:'
|
|
line: 'shadow: files ldap'
|
|
|
|
# TODO: think about security... we should move the ldap admin password somewhere else
|
|
- name: ldap configuration
|
|
template:
|
|
src: 'ldap.conf'
|
|
dest: '/etc/ldap.conf'
|
|
owner: 'root'
|
|
group: 'root'
|
|
mode: 0644
|