変数を確認する方法
実行中の変数を表示するには、debug モジュールの msg か var を使う。
var は1つの変数しか表示できない。
code:dump_var.yml
- hosts: localhost
gather_facts: no
vars:
foo: Hello
tasks:
- debug:
var: foo
ansible_variables の一覧をどのようにすれば確認できますか https://docs.ansible.com/ansible/2.9_ja/reference_appendices/faq.html#ansible-variables
ホスト固有の全変数を確認するにはどうすればいいですかhttps://docs.ansible.com/ansible/2.9_ja/reference_appendices/faq.html#browse-host-vars
ホストに定義されたインベントリー変数をすべて確認するにはどうすればいいですか https://docs.ansible.com/ansible/2.9_ja/reference_appendices/faq.html#browse-inventory-vars
https://qiita.com/tbuchi888/items/ddb7f9d51b578d5ecfa2