[英]Ansible ec2_fact documentation
我進行了廣泛的搜索,試圖找到一些與 Ansible 的ec2_facts
模塊相關的不錯的文檔,特別是與該模塊創建的變量相關的文檔。 但是,我似乎找不到任何東西。 看起來有名為ansible_ec2_instance_id
和ansible_ec2_instance_type
變量被創建,但我正在尋找由該模塊生成的所有變量的完整列表。
有沒有辦法用調試模塊打印出ec2_facts
存儲的變量?
我試過這個:
- name: Get the ec2 facts of this instance
debug:
ec2_facts:
但這會引發語法異常。
那可能對你有幫助。
- hosts: ec2
gather_facts: yes
connection: local
vars:
- region: 'us-west-2'
tasks:
- name: Gather EC2 facts
local_action: ec2_facts
register: ec2facts
- debug:
msg: "{{ ec2facts }}"
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.