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
|
when: samba_shares
|
||||||
tags: samba
|
tags: samba
|
||||||
|
|
||||||
- name: Check if webserver document root exists
|
- name: Ensute webserver document root exists
|
||||||
when: samba_create_varwww_symlinks
|
file:
|
||||||
stat:
|
name: "{{ samba_www_documentroot }}"
|
||||||
path: "{{ samba_www_documentroot }}"
|
state: directory
|
||||||
register: documentroot
|
|
||||||
tags: samba
|
tags: samba
|
||||||
|
|
||||||
- name: Create link to shares in webserver document root
|
- name: Create link to shares in webserver document root
|
||||||
when: documentroot.stat.isdir is defined and documentroot.stat.isdir == true
|
|
||||||
file:
|
file:
|
||||||
state: link
|
state: link
|
||||||
path: "{{ samba_www_documentroot }}/{{ item.name }}"
|
path: "{{ samba_www_documentroot }}/{{ item.name }}"
|
||||||
@ -68,7 +66,7 @@
|
|||||||
|
|
||||||
- name: Samba configuration
|
- name: Samba configuration
|
||||||
template:
|
template:
|
||||||
dest: /etc/samba/smb.conf
|
dest: "{{ samba_configuration }}"
|
||||||
src: smb.conf.j2
|
src: smb.conf.j2
|
||||||
validate: 'testparm -s %s'
|
validate: 'testparm -s %s'
|
||||||
notify:
|
notify:
|
||||||
|
@ -9,6 +9,8 @@ samba_packages:
|
|||||||
samba_selinux_packages: []
|
samba_selinux_packages: []
|
||||||
samba_selinux_booleans: []
|
samba_selinux_booleans: []
|
||||||
|
|
||||||
|
samba_configuration: /etc/samba/smb.conf
|
||||||
|
|
||||||
samba_service: smbd
|
samba_service: smbd
|
||||||
winbind_service: nmbd
|
winbind_service: nmbd
|
||||||
|
|
||||||
|
@ -13,6 +13,8 @@ samba_selinux_booleans:
|
|||||||
- samba_enable_home_dirs
|
- samba_enable_home_dirs
|
||||||
- samba_export_all_rw
|
- samba_export_all_rw
|
||||||
|
|
||||||
|
samba_configuration: /etc/samba/smb.conf
|
||||||
|
|
||||||
samba_service: smb
|
samba_service: smb
|
||||||
winbind_service: nmb
|
winbind_service: nmb
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user