diff --git a/defaults/main.yml b/defaults/main.yml index 7cafd0e..8e21df1 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -9,4 +9,5 @@ samba_passdb_backend: 'tdbsam' samba_map_to_guest: 'bad user' samba_load_printers: false samba_load_homes: false +samba_create_varwww_symlinks: false samba_shares_root: '/srv/shares' diff --git a/tasks/main.yml b/tasks/main.yml index 130f085..5683803 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -35,7 +35,7 @@ tags: samba - name: Check if /var/www/html exists - when: samba_create_varwww_symlinks is defined and samba_create_varwww_symlinks == true + when: samba_create_varwww_symlinks stat: path=/var/www/html register: var_www_html tags: samba diff --git a/tests/test-full.yml b/tests/test-full.yml index 0e6c8c2..ff1f429 100644 --- a/tests/test-full.yml +++ b/tests/test-full.yml @@ -1,13 +1,20 @@ --- - hosts: all sudo: true + pre_tasks: + - name: Ensure /var/www/html exists + file: + name: /var/www/html + state: directory + vars: - samba_netbios_name: SAMBA_TEST + #samba_netbios_name: SAMBA_TEST samba_server_string: 'Welcome to the test file server' samba_workgroup: TESTGROUP samba_load_homes: true samba_load_printers: false + samba_create_varwww_symlinks: true samba_log: /var/log/samba.log samba_log_size: 60000 @@ -35,6 +42,5 @@ write_list: +users group: users setype: public_content_t - samba_create_varwww_symlinks: yes roles: - samba