Ensure webserver document root exists; move hard coded config file name to vars
This commit is contained in:
parent
3e0776eecb
commit
39c5bb3a9c
@ -50,15 +50,13 @@
|
||||
when: samba_shares
|
||||
tags: samba
|
||||
|
||||
- name: Check if webserver document root exists
|
||||
when: samba_create_varwww_symlinks
|
||||
stat:
|
||||
path: "{{ samba_www_documentroot }}"
|
||||
register: documentroot
|
||||
- name: Ensute webserver document root exists
|
||||
file:
|
||||
name: "{{ samba_www_documentroot }}"
|
||||
state: directory
|
||||
tags: samba
|
||||
|
||||
- name: Create link to shares in webserver document root
|
||||
when: documentroot.stat.isdir is defined and documentroot.stat.isdir == true
|
||||
file:
|
||||
state: link
|
||||
path: "{{ samba_www_documentroot }}/{{ item.name }}"
|
||||
@ -68,7 +66,7 @@
|
||||
|
||||
- name: Samba configuration
|
||||
template:
|
||||
dest: /etc/samba/smb.conf
|
||||
dest: "{{ samba_configuration }}"
|
||||
src: smb.conf.j2
|
||||
validate: 'testparm -s %s'
|
||||
notify:
|
||||
|
@ -9,6 +9,8 @@ samba_packages:
|
||||
samba_selinux_packages: []
|
||||
samba_selinux_booleans: []
|
||||
|
||||
samba_configuration: /etc/samba/smb.conf
|
||||
|
||||
samba_service: smbd
|
||||
winbind_service: nmbd
|
||||
|
||||
|
@ -13,6 +13,8 @@ samba_selinux_booleans:
|
||||
- samba_enable_home_dirs
|
||||
- samba_export_all_rw
|
||||
|
||||
samba_configuration: /etc/samba/smb.conf
|
||||
|
||||
samba_service: smb
|
||||
winbind_service: nmb
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user