opts:"{{ ((item.mountopts | default([])) if not (item.password is defined and item.password) else ((item.mountopts | default([])) + ['credentials=/root/.smbcredentials/' + item.name])) | join(',') }}"
state:"{{ item.state | default('mounted') }}"
loop:"{{ smb_shares }}"
loop_control:
label:"mount: {{ item.source }} {{ item.mountpoint }} cifs {% if item.mountopts is defined %}{{ item.mountopts | join(',') }}{% endif %}"