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
|
when: samba_shares
|
||||||
tags: samba
|
tags: samba
|
||||||
|
|
||||||
- name: Check if /var/www/html exists
|
- name: Check if webserver document root exists
|
||||||
when: samba_create_varwww_symlinks
|
when: samba_create_varwww_symlinks
|
||||||
stat: path=/var/www/html
|
stat:
|
||||||
register: var_www_html
|
path: "{{ samba_www_documentroot }}"
|
||||||
|
register: documentroot
|
||||||
tags: samba
|
tags: samba
|
||||||
|
|
||||||
- name: Create link to shares in /var/www/html
|
- name: Create link to shares in webserver document root
|
||||||
when: var_www_html.stat.isdir is defined and var_www_html.stat.isdir == true
|
when: documentroot.stat.isdir is defined and documentroot.stat.isdir == true
|
||||||
file:
|
file:
|
||||||
state: link
|
state: link
|
||||||
path: "/var/www/html/{{ item.name }}"
|
path: "{{ samba_www_documentroot }}/{{ item.name }}"
|
||||||
src: "{{ item.path|default([samba_shares_root,item.name]|join('/')) }}"
|
src: "{{ item.path|default([samba_shares_root,item.name]|join('/')) }}"
|
||||||
with_items: "{{ samba_shares }}"
|
with_items: "{{ samba_shares }}"
|
||||||
tags: samba
|
tags: samba
|
||||||
|
@ -11,3 +11,5 @@ samba_selinux_booleans: []
|
|||||||
|
|
||||||
samba_service: smbd
|
samba_service: smbd
|
||||||
winbind_service: nmbd
|
winbind_service: nmbd
|
||||||
|
|
||||||
|
samba_www_documentroot: /var/www
|
||||||
|
@ -15,3 +15,5 @@ samba_selinux_booleans:
|
|||||||
|
|
||||||
samba_service: smb
|
samba_service: smb
|
||||||
winbind_service: nmb
|
winbind_service: nmb
|
||||||
|
|
||||||
|
samba_www_documentroot: /var/www/html
|
||||||
|
Loading…
Reference in New Issue
Block a user