반응형
winrm 설치는 여기 참조
윈도우 전원 shutdown
---
- hosts: all
gather_facts: no
ignore_unreachable: yes
tasks:
- name: Run an executable and send data to the stdin for the executable
win_command: powershell.exe Stop-Computer -Force
윈도우 전원 reboot
---
- hosts: all
gather_facts: no
ignore_unreachable: yes
tasks:
- name: Reboot the machine with all defaults
win_reboot:
윈도우 서비스 모듈
- start_mode : auto | delayed | disabled | manual
- state : absent | paused | started | stopped | restarted
---
- hosts: all
gather_facts: no
ignore_unreachable: yes
tasks:
- name: Ensure WinRM starts when the system has settled and is ready to work reliably
win_service:
name: DNS
start_mode: manual
state: stopped
반응형
'Automation Tools > Ansible' 카테고리의 다른 글
[Ansible] VMware ESXi 사용하기 (0) | 2022.05.20 |
---|---|
Windows Ansible | [Playbook] 역할 및 기능 설치(win_feature) (0) | 2022.05.16 |
9. ansible | windows winrm을 이용한 ansible 사용 (0) | 2022.04.27 |
8.5 ansible | [playbook] docker 설치 (0) | 2021.03.16 |
8.4 ansible | [playbook] nodejs, npm 설치 (0) | 2021.03.16 |