ansible / ansible.builtin / v2.3.3.0-1 / module / ec2_facts Gathers facts about remote hosts within ec2 (aws) | "added in version" 1.0 of ansible.builtin" Authors: Silviu Dicu (@silviud) <silviudicu@gmail.com> stableinterface | supported by curatedansible.builtin.ec2_facts (v2.3.3.0-1) — module
pip
Install with pip install ansible==2.3.3.0.post1
This module fetches data from the metadata servers in ec2 (aws) as per http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html. The module must be called from within the EC2 instance itself.
# Conditional example - name: Gather facts ec2_facts:
- name: Conditional debug: msg: "This instance is a t1.micro" when: ansible_ec2_instance_type == "t1.micro"
validate_certs: choices: - 'yes' - 'no' default: 'yes' description: - If C(no), SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. required: false version_added: 1.5.1 version_added_collection: ansible.builtin