Moved webserver document root to vars (and fixed path for Debian)
This commit is contained in:
parent
a0b310d4ad
commit
3e0776eecb
@ -50,17 +50,18 @@
|
||||
when: samba_shares
|
||||
tags: samba
|
||||
|
||||
- name: Check if /var/www/html exists
|
||||
- name: Check if webserver document root exists
|
||||
when: samba_create_varwww_symlinks
|
||||
stat: path=/var/www/html
|
||||
register: var_www_html
|
||||
stat:
|
||||
path: "{{ samba_www_documentroot }}"
|
||||
register: documentroot
|
||||
tags: samba
|
||||
|
||||
- name: Create link to shares in /var/www/html
|
||||
when: var_www_html.stat.isdir is defined and var_www_html.stat.isdir == true
|
||||
- name: Create link to shares in webserver document root
|
||||
when: documentroot.stat.isdir is defined and documentroot.stat.isdir == true
|
||||
file:
|
||||
state: link
|
||||
path: "/var/www/html/{{ item.name }}"
|
||||
path: "{{ samba_www_documentroot }}/{{ item.name }}"
|
||||
src: "{{ item.path|default([samba_shares_root,item.name]|join('/')) }}"
|
||||
with_items: "{{ samba_shares }}"
|
||||
tags: samba
|
||||
|
@ -11,3 +11,5 @@ samba_selinux_booleans: []
|
||||
|
||||
samba_service: smbd
|
||||
winbind_service: nmbd
|
||||
|
||||
samba_www_documentroot: /var/www
|
||||
|
@ -15,3 +15,5 @@ samba_selinux_booleans:
|
||||
|
||||
samba_service: smb
|
||||
winbind_service: nmb
|
||||
|
||||
samba_www_documentroot: /var/www/html
|
||||
|
Loading…
Reference in New Issue
Block a user