# Ansible windows async issue.

**URL:** <https://forum.ansible.com/t/ansible-windows-async-issue/24852>\
**Category:** Ansible Project\
**Tags:** windows\
**Created:** [June 29, 2017, 5:20pm UTC](https://forum.ansible.com/t/ansible-windows-async-issue/24852 "2017-06-29T17:20:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sreenivas\_Chokkarapu](https://avatars.discourse-cdn.com/v4/letter/s/c77e96/32.png) [@Sreenivas\_Chokkarapu](https://forum.ansible.com/u/Sreenivas_Chokkarapu)\
**Post date:** [June 29, 2017, 5:20pm UTC](https://forum.ansible.com/t/ansible-windows-async-issue/24852/1 "2017-06-29T17:20:35Z")

</div>

Hi guys,

I’m trying to use the ansible’s async feature to speed up the deployment process. Basically, this a windows  
deployment occurs in 2 stages: 1) analysis deployment (7hrs - 6 vms) 2) head deployment (6hrs - 1 vm).  
I’m trying to run these deployments in parallel. In test env, there are only 2 analysis servers, 1 head server.  
The problem is that analysis deployment happens only on one of analysis server, but doesn’t seems to deploy on the another analysis server; the head deployment is fine too.In another env, (total 3 vms), it missed out deployment on the head vm.

Here is the play:

- name: legacy Installation (Analysis server)

win\_shell: \>  
{{ script\_dir }}\Installapp.ps1  
‘4. Analysis Server’  
{{ headnode }}  
{{ ansible\_domain }}{{ ansible\_user }}  
{{ ansible\_password }}  
async: 25200  
poll: 0  
register: analysis\_deployment  
when: “‘risklink17-analysis’ in group\_names”

- debug: var=analysis\_deployment  
when: “‘risklink17-analysis’ in group\_names”

- name: legacy Installation (Head server)  
win\_shell: \>  
{{ script\_dir }}\Installapp.ps1  
‘5. Job Server and Database Server’  
{{ headnode }}  
{{ ansible\_domain }}{{ ansible\_user }}  
{{ ansible\_password }}  
-skip\_mail  
async: 21600  
poll: 0  
register: head\_deployment  
when: “‘risklink17-head’ in group\_names”

- debug: var=head\_deployment  
when: “‘risklink17-head’ in group\_names”

- name: Waiting for analysis deployment to complete…  
async\_status: jid={{ analysis\_deployment.ansible\_job\_id }}  
register: analysis\_result  
until: analysis\_result.finished  
retries: 420  
delay: 60  
when: “‘risklink17-analysis’ in group\_names”

- name: Analysis deployment completed, waiting for Head deployment.  
async\_status: jid={{ head\_deployment.ansible\_job\_id }}  
register: head\_result  
until: head\_result.finished  
retries: 360  
delay: 60  
when: “‘risklink17-head’ in group\_names”

On the vm, where the deployment missed, i see this error from the eventviewer app:

```auto

Settings: Could not read key from registry (Exception from HRESULT: 0x80040150 (REGDB_E_READREGDB))

Details:
ExceptionClass=COMException
ErrorCategory=
ErrorId=
ErrorMessage=Could not read key from registry (Exception from HRESULT: 0x80040150 (REGDB_E_READREGDB))

```

I’m using ansible version: 2.2.1.0; any help on this would be much appreciated.
