Creating the user creates the `./passwords/my-server/users/deployer` file containing the password and a salt. The salt comes from the `encrypted` parameter which in turn is needed by the `user` module because it requires an encrypted password. Without this parameter you will set the users password to an unknown one.
Different to the `user` module Ansible expects the `ansible_sudo_pass` variable to be in plaintext. Therefore we use the lookup method without an encrypted parameter. With Ansible 1.9 this resulted in a password file where the salt part was removed. (I assume this was not intended, but for my use case it was not a problem.)
Nonetheless this procedure worked with Ansible 1.9.
After updating to Ansible 2 my server provisioning process started to fail due to a wrong sudo password. The first thing I noticed was that the lookup function no longer removed the salt part of the password file. Secondly it seems that compared to 1.9 it now reads the entire file instead of only the password. This in turn means the `ansible_sudo_pass` also contains the salt part of the file which results in an obviously wrong password.
Thank you for reading. I appreciate any pointers and tips on how to accomplish my goal under Ansible 2.