It seems that it is impossible to run a local task when talking to windows 
hosts.  This is pretty much a show stopper for my current use case of 
Ansbile.

ansible version:  ansible 2.1.1.0

using any of the following, all result in the same error

- name: deploy some stuff
  hosts: somewindowshosts
  gather_facts: True
  serial: 1
  pre_tasks:
    - name: disable {{ inventory_hostname }} from LB
      delegate_to: localhost
      connection: local
      command: /usr/bin/magic_lb_removal_script
      #local_action: command foo
      #delegate_to: 127.0.0.1
  roles:
     - { role: foo }
     - { role: bar }


<localhost> ESTABLISH WINRM CONNECTION FOR USER: Administrator on PORT 5985 
TO localhost
fatal: [172.28.18.158]: UNREACHABLE! => {"changed": false, "msg": 
"plaintext: HTTPConnectionPool(host='localhost', port=5985): Max retries 
exceeded with url: /wsman (Caused by 
NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection 
object at 0x21aa610>: Failed to establish a new connection: [Errno 111] 
Connection refused',))", "unreachable": true}

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/2640b177-9b32-40fe-af2e-665d2cc639ad%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to