- Learning DevOps
- Mikael Krief
- 156字
- 2021-06-24 12:32:11
Creating an inventory for targeting Ansible hosts
The inventory contains the list of hosts on which Ansible will perform administration and configuration actions.
There are two types of inventories:
- Static inventory: Hosts are listed in a text file in INI (or YAML) format; this is the basic mode of Ansible inventory. The static inventory is used in cases where we know the host addresses (IP or FQDN).
- Dynamic inventory: The list of hosts is dynamically generated by an external script (for example, with a Python script). The dynamic inventory is used in case we do not have the addresses of the hosts, for example, as with an infrastructure that is composed of on-demand environments.
In this section, we will see how to create a static inventory in init format, starting with a basic example, and then we will look at the groups and host configuration.
Let's start by seeing how to create a static inventory file.
推薦閱讀
- 眼科急癥工作實(shí)用手冊(cè)
- 常用運(yùn)動(dòng)損傷理療技術(shù)操作手冊(cè)
- 腎病綜合征
- 癌癥療愈錄:腫瘤門(mén)診敘事紀(jì)實(shí)
- 醫(yī)院消毒:消毒工作的重中之重
- 兒童青少年情緒障礙
- 口腔科常見(jiàn)及多發(fā)病就醫(yī)指南系列:口腔正畸就醫(yī)指南
- 臨床神經(jīng)遺傳病學(xué)
- 實(shí)用皮膚病性病圖譜
- 你的第一本抑郁自救指南
- 出生缺陷與遺傳性疾病的檢驗(yàn)診斷
- 放射診斷學(xué)讀片:北京協(xié)和醫(yī)院放射十年影像薈萃
- 臨床急癥介入治療學(xué)
- 口腔微生物學(xué)實(shí)驗(yàn)指導(dǎo)
- 骨盆解剖及功能訓(xùn)練圖解