Issue 1:
ISSUE TYPE

Bug Report

COMPONENT NAME

become_method: su

ANSIBLE VERSION

ansible 2.3.0.0
config file = /home/user/testing/ansible.cfg
configured module search path = Default w/o overrides
python version = 2.7.13 (default, Jan 19 2017, 14:48:08) [GCC 6.3.0 20170118]

CONFIGURATION

[defaults]
hostfile = inventory
legacy_playbook_variables = false
nocows = 1
retry_files_enabled = false

OS / ENVIRONMENT

N/A

SUMMARY

Become method SU times out, rendering it unusable. Tested on multiple operating systems, all with the prompt "Password: "

STEPS TO REPRODUCE

ansible testboxen --become-method=su -b -K -a whoami

EXPECTED RESULTS

su to correctly authenticate as root, and return root from whoami

ACTUAL RESULTS

testboxen | FAILED | rc=-1 >>
Timeout (12s) waiting for privilege escalation prompt:

Issue 2:
ISSUE TYPE

Bug Report

COMPONENT NAME

win_user

ANSIBLE VERSION

$ ansible --version
ansible 2.3.0.0
config file = /etc/ansible/ansible.cfg
configured module search path = Default w/o overrides
python version = 2.6.6 (r266:84292, Aug 18 2016, 12:06:14) [GCC 4.4.7 20120313 (Red Hat 4.4.7-17)]

CONFIGURATION

n/a

OS / ENVIRONMENT

Running on Centos 7, managing Windows Server 2016

SUMMARY

win_user can create a user, but running task again in playbook results in error

STEPS TO REPRODUCE

A minimal playbook

---
# vim: set filetype=ansible ff=unix ts=2 sw=2 ai expandtab :
#
# Playbook to configure the environment

- hosts: createuser
tasks:
- name: create user
run_once: true
win_user:
name: gary
password: 'B0bP4ssw0rd123!^'
password_never_expires: true
account_disabled: no
account_locked: no
password_expired: no
state: present
groups:
- Administrators
- Users

When I run first time I get:

PLAY [createuser] ************************

TASK [Gathering Facts] *******************
ok: [dsy-demo-mssql02]

TASK [create user] ***********************
changed: [dsy-demo-mssql02]

PLAY RECAP *******************************
dsy-demo-mssql02 : ok=2 changed=1 unreachable=0 failed=0

When I rerun the same playbook I get an error

Just trying to work out if there is anything obvious I could be doing wrong.

I have verified that I can login to the created account.

verbose output is not much different:

TASK [create user] *********************************
task path: /root/ansible_windows/createuser-playbook.yml:9
Using module file /usr/lib/python2.6/site-packages/ansible/modules/windows/win_user.ps1
<dsy-demo-mssql02> ESTABLISH WINRM CONNECTION FOR USER: local\\Administrator on PORT 5986 TO dsy-demo-mssql02
EXEC (via pipeline wrapper)
fatal: [dsy-demo-mssql02]: FAILED! => {
"changed": false,
"failed": true,
"msg": "Exception calling \"ValidateCredentials\" with \"2\" argument(s): \"The network path was not found.\r\n\""
}

EXPECTED RESULTS

the play should return 'ok' as the user already exists

ACTUAL RESULTS

PLAY [createuser] ************************

TASK [Gathering Facts] *******************
ok: [dsy-demo-mssql02]

TASK [create user] ***********************
fatal: [dsy-demo-mssql02]: FAILED! => {"changed": false, "failed": true, "msg": "Exception calling \"ValidateCredentials\" with \"2\" argument(s): \"The network path was not found.\r\n\""}

NO MORE HOSTS LEFT ***********************
to retry, use: --limit @/root/ansible_windows/createuser-playbook.retry

PLAY RECAP *******************************
dsy-demo-mssql02 : ok=1 changed=0 unreachable=0 failed=1