Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---
- - name: add to local admin
- hosts: all
- vars:
- ansible_become_password: `some_password`
- tasks:
- - win_whoami:
- become: yes
- become_user: ''SOMEDOMAINSOMEUSER''
- become_method: runas
- The full traceback is:
- Exception calling "RunAsUser" with "7" argument(s): "LogonUser failed (Logon failure: the user has not been granted
- the requested logon type at this computer, Win32ErrorCode 1385)"
- At line:1087 char:9
- + $result = [Ansible.BecomeUtil]::RunAsUser($username, $passwor ...
- + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- + CategoryInfo : NotSpecified: (:) [], MethodInvocationException
- + FullyQualifiedErrorId : Win32Exception
- fatal: [SERVERNAME]: FAILED! => {
- "changed": false,
- "msg": "Failed to become user SOMEDOMAIN\SOMEUSER: Exception calling "RunAsUser" with "7" argument(s): "LogonUser failed (Logon failure: the user has not been granted the requested logon type at this computer, Win32ErrorCode 1385)""
- }
Add Comment
Please, Sign In to add comment