title: Non interactive samba user creation via ansible
body: <p>Although the following command works when typing in in shell</p>
  
  <pre><code>echo -ne "myser\nmypass\n" | smbpasswd -a -s myuser
  </code></pre>
  
  <p>The following task fails in ansible</p>
  
  <pre><code>  - name: add dms samba user
      command: echo -ne "myuser\nmypass\n" | smbpasswd -a -s myuser
      notify: restart samba
  </code></pre>
  
  <p>It does not produce any errors, but the user is not created.</p>
  
  <p>Working with <code>ansible 2.3.0.0</code> on <code>Ubuntu 16.0.4.</code></p>