- Ansible Quick Start Guide
- Mohamed Alibi
- 102字
- 2021-07-23 16:37:47
Ad hoc versus playbook: the win_reboot module
The ad hoc command can be simply executed as shown in the following two examples:
ansible winservers -m win_reboot
ansible win servers -m win_reboot –args="msg='Reboot initiated by remote admin' pre_reboot_delay=5"
The resulting output of either command will look as follows:
This playbook file contains two ways of restarting hosts using the same module:
---
- name: Reboot Windows hosts
hosts: winservers
fast_gathering: false
tasks:
- name: restart Windows hosts with default settings
win_reboot
- name: restart Windows hosts with personalized
settings
win_reboot:
msg: "Reboot initiated by remote admin"
pre_reboot_delay: 5
The resulting playbook output will look as follows:
推薦閱讀
- Mastering Mesos
- 三菱FX3U/5U PLC從入門到精通
- 大數(shù)據(jù)改變世界
- Hadoop Real-World Solutions Cookbook(Second Edition)
- 大型數(shù)據(jù)庫管理系統(tǒng)技術(shù)、應(yīng)用與實(shí)例分析:SQL Server 2005
- 21天學(xué)通Java
- 電腦主板現(xiàn)場維修實(shí)錄
- 網(wǎng)絡(luò)布線與小型局域網(wǎng)搭建
- 新編計(jì)算機(jī)圖形學(xué)
- Statistics for Data Science
- 統(tǒng)計(jì)挖掘與機(jī)器學(xué)習(xí):大數(shù)據(jù)預(yù)測(cè)建模和分析技術(shù)(原書第3版)
- 強(qiáng)化學(xué)習(xí)
- Drupal高手建站技術(shù)手冊(cè)
- Data Analysis with R(Second Edition)
- 網(wǎng)頁設(shè)計(jì)與制作