Hi Jordan,
  This is how i'm calling my module:
- hosts: management
gather_facts: false
run_once: true
vars:
ansible_become_user: "{{ servicefabric_details['sf_serv_account'] }}@{{
datacenter_domain }}"
ansible_become_password: "{{ service_fabric_password['password'] }}"
sf_base_dir: "{{ servicefabric_details['sf_local_installer_path'] }}"
sf_config_dir: "{{ servicefabric_details['sf_local_installer_path'] }}\\
config"
tasks:
- block:
- name: Create Service Fabric Cluster
# servicefabric_cluster:
# action: "present"
# sf_tools_path: "{{ working_dir }}"
# clusterconfigfilepath: "{{ sf_config_dir }}\\{{ cluster_name }}.json"
# NoCleanupOnFailure: true
# timeoutinseconds: 300
win_whoami:
become: yes
become_method: runas
register: clustercreate


As you can see the service_fabric module is commented out just for testing
while using win_whoami, but that is as it was called.

Become does indeed work fine with the win_whoami and win_command modules

Also I do not have the #requires -become flag in my module.

On Sat, 27 Oct 2018 at 01:16, Jordan Borean <[email protected]> wrote:

> Become and Windows was still experimental in Ansible 2.4 but not much
> changed between 2.4 to 2.5+ apart from new features being added. Are you
> able to try and run your task with the following vars set to rule out an
> incorrect password being set;
>
> - module:
>   vars:
>     ansible_become: yes
>     ansible_become_method: runas
>     ansible_become_user: [email protected]
>     ansible_become_pass: password
>
> Can you also share the following;
>
> * How are you calling your module with become, are you enabling it from
> your playbook or cmdline or have you added '#AnsibleRequires -Become' to
> your module
> * When you say whoami or win_command work fine, do you mean that become
> works with them?
>
> This is a weird one because what you are saying it true, the module should
> not affect the become side as it cannot control the become process, except
> to tell Ansible that become is required with the '#AnsibleRequires -Become'
> flag.
>
> Thanks
>
> 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 [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/8885348d-2913-433a-803f-35e8d741033e%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/8885348d-2913-433a-803f-35e8d741033e%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CA%2BQ6npF1jr0T_uw_opUsjHQBYOE03ymWkzWxZ8nMYFtec2eFCg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to