Ansible windows async issue.

36 views
Skip to first unread message

Sreenivas Chokkarapu

unread,
Jun 29, 2017, 3:52:53 PM6/29/17
to Ansible Project
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:

```
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.
Reply all
Reply to author
Forward
0 new messages