0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

インベントリファイル

Posted at

1.インベントリファイルについて

 インベントリファイルは、Ansibleが設定対象にするサーバーやネットワーク機器を記述します。
 IPアドレス、またはhostsやDNSで解決されている名前を記述します。
 機器をグループ化することができます。グループにより、ansibleコマンドでの実行単位を指定することができます。

hosts記述ルール
[グループ名]
(IPアドレス)
(/etc/hosts, DNSに登録されているホスト名)

[グループ名]
  ・
  ・
hosts 記述例
[WebServer]
web-1
Web-2

[TomcatServer]
192.168.10.21
192.168.10.22

※インベントリファイルには、ホスト変数を指定したり、連番の機器名の省力化をしたりと様々な記述ができます。
 詳細は下記を参照。

  参考URL:https://docs.ansible.com/ansible/latest/user_guide/intro_inventory.html

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?