Any Windows module supports become, it's implementation is completely 
independent from modules themselves. In the majority of situations a module 
is run as Administrator but there are a few cases where that may not apply. 
To test it out run

- win_whoami:

You can also run it with become to test it out. If the Mandatory label in 
the groups section of the win_whoami output is High then it's running as 
Administrator.

On Thursday, February 18, 2021 at 8:03:25 PM UTC+10 [email protected] 
wrote:

> Hi thanks for your reply.But I  think win_package module does not support 
> become parameter.
>
> On Thu, Feb 18, 2021, 2:55 PM Dick Visser <[email protected]> wrote:
>
>>
>> https://docs.ansible.com/ansible/latest/user_guide/become.html#become-directives
>>
>> On Thu, 18 Feb 2021 at 09:33, sd <[email protected]> wrote:
>> >
>> > I am trying to run a software via win_package module. But that software 
>> requires running as administrator which causes my script stuck at one 
>> position. How to run it as administrator. I am running trough a user which 
>> a member of admin group. here is my code
>> >
>> >  -   name: installing Devexpress
>> >     hosts: win
>> >     gather_facts: yes
>> >     become_method: runas
>> >
>> >
>> >     tasks:
>> >
>> >         - name: installing DevExpress13
>> >           win_package:
>> >              path: D:\Soft\DevExpress13.exe
>> >              arguments: /S /VERYSILENT
>> >              state: present
>> >
>> > --
>> > 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 [email protected].
>> > To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/ansible-project/9a656b6d-fba7-4ea5-843c-5642fc761053n%40googlegroups.com
>> .
>>
>>
>>
>> -- 
>> Dick Visser
>> Trust & Identity Service Operations Manager
>> GÉANT
>>
>> -- 
>> 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 [email protected].
>>
> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/ansible-project/CAL8fbwML6TKrNW1613Ri88EpVC6pGhk2JDHjSpbVS0MCcsJ2iA%40mail.gmail.com
>> .
>>
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/4ac2b219-3a1a-4dd6-b634-d1969e50d832n%40googlegroups.com.

Reply via email to