0

We have a working setup for ansible with windows via ssh. I know ssh is officially not supported, but the following behavior is more random:

For our laptops I want to shut them down via ansible after maintenance. The following is playbook for shutdown:

---
- name: "Shutdown Win10 Orange Cart"
  hosts: Lab01
  tasks:
    - name: Shutdown
      ansible.builtin.raw: shutdown /s /t 10
      poll: 0
      register: shutdown_output
      changed_when: shutdown_output.rc != 0

This works kind of more than half of the system actually shutdown. And the result always states at the first run that all 30 Systems are finished with "ok=2". But not all machines go down actually. A few just stays active. For the moment I repeat the playbook after all machines are unreachable. But this is a silly workaround.

0

You must log in to answer this question.

Browse other questions tagged .