2015-07-12 21:13:12 +00:00
|
|
|
---
|
2015-09-13 23:08:32 +00:00
|
|
|
# SAMBA configuration for domain
|
|
|
|
|
|
|
|
- name: Configuring SAMBA
|
|
|
|
template:
|
|
|
|
src: smb.conf
|
|
|
|
dest: /etc/samba/smb.conf
|
|
|
|
validate: 'testparm -s %s'
|
|
|
|
backup: yes
|
2015-07-12 21:13:12 +00:00
|
|
|
register: cfg_samba
|
|
|
|
|
2015-09-13 23:08:32 +00:00
|
|
|
- name: Configuring AppArmor home directories
|
2015-08-20 02:51:42 +00:00
|
|
|
replace:
|
2015-08-20 02:34:13 +00:00
|
|
|
dest: /etc/apparmor.d/tunables/home
|
2015-08-20 02:44:07 +00:00
|
|
|
regexp: '^@\{HOMEDIRS\}=/home/$'
|
2015-09-20 23:29:34 +00:00
|
|
|
replace: '@{HOMEDIRS}=/home/ /home/{{ ansible_local.domain.domainshort }}/'
|
2015-08-20 02:34:13 +00:00
|
|
|
|
2015-09-13 23:08:32 +00:00
|
|
|
- name: SAMBA restart
|
2015-09-14 01:45:35 +00:00
|
|
|
shell: restart smbd
|
2016-01-12 21:23:52 +00:00
|
|
|
become: yes
|
2015-07-12 21:13:12 +00:00
|
|
|
when: cfg_samba|changed
|
|
|
|
|
2015-09-13 23:08:32 +00:00
|
|
|
- name: Winbind restart
|
2015-09-14 07:52:15 +00:00
|
|
|
shell: restart winbind
|
2016-01-12 21:23:52 +00:00
|
|
|
become: yes
|
2015-07-12 21:13:12 +00:00
|
|
|
when: cfg_samba|changed
|
|
|
|
|
2015-09-13 23:08:32 +00:00
|
|
|
- name: Creating home base
|
|
|
|
file:
|
2015-09-20 23:29:34 +00:00
|
|
|
path: '/home/{{ ansible_local.domain.domainshort }}'
|
2015-09-13 23:08:32 +00:00
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
state: directory
|
|
|
|
|
|
|
|
- name: Permitting SAMBA domopers to run sudo
|
|
|
|
template:
|
|
|
|
src: sudoers.d
|
|
|
|
dest: /etc/sudoers.d/domain
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0440
|
|
|
|
validate: "/usr/sbin/visudo -cf %s"
|