- Ansible Quick Start Guide
- Mohamed Alibi
- 252字
- 2021-07-23 16:37:46
Ansible modules overview
When installing Ansible, the user will also receive a very handy set of modules. This set is called a module library. It is a list of predefined functions and actions to be called when using Ansible, either via ad hoc commands or by running playbooks. An Ansible user is not limited to the predefined Ansible modules; they can easily write their own using Python and JSON scripting. The modules that come with the installation of Ansible might be referred to as task plugins or library plugins, but do not mistake these for the actual Ansible plugins, which are the scripts that allow Ansible to interact with other systems, a subject for another chapter.
The Ansible module library comes with its own machine library. Use the ansible-doc command followed by the name of the module to find out more about how it is used and what its output variables are:
ansible-doc apt
To list all the available modules, use the -l option:
ansible-doc -l
Using modules is very simple. You need to identify the name of the module, then input its arguments if required. Not all modules require argument input (the ping module, for example, doesn't require this) but most do. For other modules, inputting arguments is optional and might allow you to personalize the action, such as in the case of the Windows reboot module. As an example, let's look at executing modules in both ad hoc and playbook mode.
- 現(xiàn)代測控系統(tǒng)典型應(yīng)用實例
- 網(wǎng)絡(luò)服務(wù)器架設(shè)(Windows Server+Linux Server)
- Visual C# 2008開發(fā)技術(shù)實例詳解
- 計算機(jī)網(wǎng)絡(luò)技術(shù)基礎(chǔ)
- 大數(shù)據(jù)處理平臺
- Photoshop CS3圖像處理融會貫通
- 新編計算機(jī)組裝與維修
- 從零開始學(xué)PHP
- 零起點學(xué)西門子S7-200 PLC
- Apache源代碼全景分析(第1卷):體系結(jié)構(gòu)與核心模塊
- Learning Apache Apex
- 網(wǎng)絡(luò)服務(wù)器搭建與管理
- PowerMill 2020五軸數(shù)控加工編程應(yīng)用實例
- 空間機(jī)器人
- Photoshop CS4數(shù)碼照片處理入門、進(jìn)階與提高