commit
f49aa012b5
@ -2,10 +2,10 @@
|
|||||||
---
|
---
|
||||||
- name: Restart Samba
|
- name: Restart Samba
|
||||||
service:
|
service:
|
||||||
name: smb
|
name: "{{ samba_service }}"
|
||||||
state: restarted
|
state: restarted
|
||||||
|
|
||||||
- name: Restart WinBind
|
- name: Restart WinBind
|
||||||
service:
|
service:
|
||||||
name: nmb
|
name: "{{ winbind_service }}"
|
||||||
state: restarted
|
state: restarted
|
||||||
|
@ -9,6 +9,12 @@ galaxy_info:
|
|||||||
- name: EL
|
- name: EL
|
||||||
versions:
|
versions:
|
||||||
- 7
|
- 7
|
||||||
|
- name: Ubuntu
|
||||||
|
versions:
|
||||||
|
- all
|
||||||
|
- name: Debian
|
||||||
|
versions:
|
||||||
|
- all
|
||||||
categories:
|
categories:
|
||||||
- system
|
- system
|
||||||
- networking
|
- networking
|
||||||
|
@ -1,17 +1,24 @@
|
|||||||
# File: roles/samba/tasks/main.yml
|
# File: roles/samba/tasks/main.yml
|
||||||
---
|
---
|
||||||
|
|
||||||
|
- include_vars: "{{ item }}"
|
||||||
|
with_first_found:
|
||||||
|
- "os_{{ ansible_distribution }}.yml"
|
||||||
|
- "os_{{ ansible_os_family }}.yml"
|
||||||
|
- "default.yml"
|
||||||
|
|
||||||
- name: Install Samba packages
|
- name: Install Samba packages
|
||||||
yum:
|
action: "{{ ansible_pkg_mgr }} pkg={{ item }} state=installed"
|
||||||
pkg: "{{ item }}"
|
|
||||||
state: installed
|
|
||||||
with_items:
|
with_items:
|
||||||
- libsemanage-python
|
|
||||||
- samba-common
|
- samba-common
|
||||||
- samba
|
- samba
|
||||||
- samba-client
|
- samba-client
|
||||||
tags: samba
|
tags: samba
|
||||||
|
|
||||||
|
- name: Install SELinux package
|
||||||
|
action: "{{ ansible_pkg_mgr }} pkg=libsemanage-python state=installed"
|
||||||
|
when: ansible_selinux
|
||||||
|
|
||||||
- name: Make sure SELinux boolean settings are correct
|
- name: Make sure SELinux boolean settings are correct
|
||||||
seboolean:
|
seboolean:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
@ -20,7 +27,7 @@
|
|||||||
with_items:
|
with_items:
|
||||||
- samba_enable_home_dirs
|
- samba_enable_home_dirs
|
||||||
- samba_export_all_rw
|
- samba_export_all_rw
|
||||||
tags: samba
|
when: ansible_selinux
|
||||||
|
|
||||||
- name: Create Samba shares root directory
|
- name: Create Samba shares root directory
|
||||||
file:
|
file:
|
||||||
@ -71,14 +78,14 @@
|
|||||||
|
|
||||||
- name: Start Samba service
|
- name: Start Samba service
|
||||||
service:
|
service:
|
||||||
name: smb
|
name: "{{ samba_service }}"
|
||||||
state: started
|
state: started
|
||||||
enabled: yes
|
enabled: yes
|
||||||
tags: samba
|
tags: samba
|
||||||
|
|
||||||
- name: Start WindBind service
|
- name: Start WindBind service
|
||||||
service:
|
service:
|
||||||
name: nmb
|
name: "{{ winbind_service }}"
|
||||||
state: started
|
state: started
|
||||||
enabled: yes
|
enabled: yes
|
||||||
tags: samba
|
tags: samba
|
||||||
|
4
vars/default.yml
Normal file
4
vars/default.yml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
samba_service: smbd
|
||||||
|
winbind_service: nmbd
|
4
vars/os_CentOS.yml
Normal file
4
vars/os_CentOS.yml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
samba_service: smb
|
||||||
|
winbind_service: nmb
|
4
vars/os_Debian.yml
Normal file
4
vars/os_Debian.yml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
samba_service: smbd
|
||||||
|
winbind_service: nmbd
|
Loading…
Reference in New Issue
Block a user