Ansible getting started Getting started with Ansible Getting started with Execution Environments Installation, Upgrade & Configuration Installation Guide Ansible Porting Guides Using Ansible Building Ansible inventories How to build your inventory Working with dynamic inventory Inventory script example: Cobbler Other inventory scripts Using inventory directories and multiple inventory sources Stat
通常の Inventory は ini 形式を拡張したテキストファイルで、中には Ansible で管理したいホストと変数の情報が書き込まれている。 しかし、これだとホストの台数や名前などが動的に変化するシチュエーションでメンテナンスが難しい。 あとは、ホストの情報が別の場所で管理されているパターンも二重管理になる可能性がある。 そうした場合には Dynamic Inventory という機能を使って動的に Inventory を生成するやり方があるようだ。 Ansible をインストールする 検証用の環境には CentOS7 を使った。 $ cat /etc/redhat-release CentOS Linux release 7.1.1503 (Core) $ uname -r 3.10.0-229.11.1.el7.x86_64 EPEL 経由で Ansible をインストールする
Puppet Camp New York 2015: Puppet Enterprise Scaling Lessons Learned (Interme...Puppet
Web developer, speaker, author, expat, book nerd, friend to cats. Ansible has excellent documentation but one thing I was confused about was the best way to store the configuration for multistage projects: say, different passwords for dev, staging, production. This isn’t really covered in the ansible-examples repo because it’s specific to your project and while the documentation has recommendation
Ansibleのディレクトリ構成を決める際、プロダクション環境、ステージング環境、開発環境といった環境ごとに異なる設定を変更する方法でしっくり来るものを思いつかず、どうしたものかと悩んでいたのですが、今日見つけたブログ記事でそれもスッキリ解消したのでメモっておきます。 結論 まず結論を。プロダクション環境、ステージング環境、開発環境といった環境ごとに異なる設定する場合は、以下のように対応するのが良さそうです。 ディレクトリ構成は、公式ドキュメントに従う。 Best Practices — Ansible Documentation プロダクション、ステージング、開発など、ステージごとの変数切替は以下のブログを参考に、"group_vars"を利用して行う。 インベントリファイルの中に、"[production:children]"のようなグループすべてが属するグループを作ってしまい、そのグ
この記事は、 2015 tech-yuruyuru アドベントカレンダー 3 日目の記事です。 Inventory file とは何か Ansible は、インフラ内の複数システムに対して同時に動作します。 Inventory file は、 Ansible が動作する対象のシステムを列挙するためのファイルです。 Host と Group では、実際に Inventory file を見ていきます まず、動作対象となる以下のシステムを Vagarant で立ち上げます mail: メールサーバ web1, web2: Web サーバ db1, db2: DB サーバ # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! VAGRANTFILE_API_VERSION = "2" Va
Ansible getting started Getting started with Ansible Getting started with Execution Environments Installation, Upgrade & Configuration Installation Guide Ansible Porting Guides Using Ansible Building Ansible inventories How to build your inventory Inventory basics: formats, hosts, and groups Default groups Hosts in multiple groups Grouping groups: parent/child group relationships Adding ranges of
Ansibleではinventoryに対象ホストを定義します。 適用したいインフラ構成が複数ある場合、playbook毎にグループ化してください。 グループ化した場合、変数はそれぞれのgroup varsに定義できます。 詳しくは、前回のエントリーを参照してください。 inventoryの構成方法には幾つかのパターンがあります。 対象とするシステムの規模や特徴にあわせて選択しましょう。 なお、パターンを整理するにあたって、Ansibleのインベントリファイルでステージを切り替えるを参考にしました。 ベーシックパターン 開発環境・検証環境・本番環境といった目的毎に環境を作る必要がなく、ひとつの環境(本番環境)のみの場合は、inventoryファイルもひとつで十分です。 hostsという名前のファイルを作成し、inventoryを定義しましょう。 構成は次のようになります。 . ├── gro
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く