Hello
I am using successfully ansible in my windows environment with Kerberos.
I am still having trouble if i want to execute a task as another user than 
my ansible user.

For example, i want to execute specific task as build user to make sure 
it's home dir is present - if not i guess my command will create it by 
login this specific user.


build_usr_password is in the var files (i used the debug module to check i 
can access it)

- name: Touching a file in order to make sure the account home dir is 
created.
win_stat:
path: C:\Users\build_usr
state: present
become: yes
become_method: runas
become_user: build_usr@DOMAIN
password: "{{ build_usr_password }}"


I tried *ansible_become_password* *become_password* and *ansible_password*. 
Still same issue:

The full traceback is:
LogonUser failed (The user name or password is incorrect, Win32ErrorCode 
1326)
At line:623 char:13
+             throw [Ansible.Shell.Win32Exception] "LogonUser failed"
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (:) [], Win32Exception
    + FullyQualifiedErrorId : LogonUser failed (The user name or password 
is incorrect, Win32ErrorCode 1326)


failed: [hasgqba110.ger.corp.intel.com] (item=bEeq07WG8-RQ.Myr9Ymd) => {
    "changed": false,
    "item": "bEeq07WG8-RQ.Myr9Ymd",
    "msg": "LogonUser failed (The user name or password is incorrect, 
Win32ErrorCode 1326)"
}

How do i define the password for this task ? (the password is in the vault 
encrypted file, i don't want to/can't pass it via the CLI)

ansible-playbook 2.4.3.0                                                    
                                                   
python version = 2.7.12 (default, Dec  4 2017, 14:50:18) [GCC 5.4.0 
20160609]                                                  


Jordan ? :)

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/34aaac74-f6dc-4e84-b628-65671e3e0b0d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to