エントリーの編集
![loading...](https://b.st-hatena.com/bdefb8944296a0957e54cebcfefc25c4dcff9f5f/images/v4/public/common/loading@2x.gif)
エントリーの編集は全ユーザーに共通の機能です。
必ずガイドラインを一読の上ご利用ください。
ansibleのhash behaviourを変更して環境別の変数を定義しやすくする
記事へのコメント0件
- 注目コメント
- 新着コメント
このエントリーにコメントしてみましょう。
注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています
![アプリのスクリーンショット](https://b.st-hatena.com/bdefb8944296a0957e54cebcfefc25c4dcff9f5f/images/v4/public/entry/app-screenshot.png)
- バナー広告なし
- ミュート機能あり
- ダークモード搭載
関連記事
ansibleのhash behaviourを変更して環境別の変数を定義しやすくする
この記事は ansible advent calender 18日目の記事です。 この記事では、ansibleのhash behaviourを変更... この記事は ansible advent calender 18日目の記事です。 この記事では、ansibleのhash behaviourを変更して環境別の変数を定義しやすくするtipsを紹介します。 hash behaviourとは ansibleのhash構造の変数が複数ファイルで定義されてる場合のマージポリシーを規定する設定項目です。これを上手く使うと、環境別の定数を定義しやすくなり、roleの再利用性が上がります。 変数をmerge/replaceモードで出力する gitという定数を複数のファイルで定義し、中身を出力してみます --- - hosts: all vars_files: - vars/base.yml - vars/override.yml tasks: - name: "degug" debug: msg="{{ git }}"