- 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:
推薦閱讀
- 電力自動(dòng)化實(shí)用技術(shù)問(wèn)答
- 大數(shù)據(jù)項(xiàng)目管理:從規(guī)劃到實(shí)現(xiàn)
- 蕩胸生層云:C語(yǔ)言開發(fā)修行實(shí)錄
- 網(wǎng)上生活必備
- 21天學(xué)通ASP.NET
- 城市道路交通主動(dòng)控制技術(shù)
- Photoshop CS3圖像處理融會(huì)貫通
- 中國(guó)戰(zhàn)略性新興產(chǎn)業(yè)研究與發(fā)展·工業(yè)機(jī)器人
- Learning Azure Cosmos DB
- Hands-On Reactive Programming with Reactor
- 基于神經(jīng)網(wǎng)絡(luò)的監(jiān)督和半監(jiān)督學(xué)習(xí)方法與遙感圖像智能解譯
- 基于企業(yè)網(wǎng)站的顧客感知服務(wù)質(zhì)量評(píng)價(jià)理論模型與實(shí)證研究
- 基于敏捷開發(fā)的數(shù)據(jù)結(jié)構(gòu)研究
- 基于人工免疫原理的檢測(cè)系統(tǒng)模型及其應(yīng)用
- 智能+:制造業(yè)的智能化轉(zhuǎn)型