ansible.builtin.ec2_facts (v2.3.3.0-1) — module

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 curated

Install Ansible via pip

Install with pip install ansible==2.3.3.0.post1

Description

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.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Conditional example
- name: Gather facts
  ec2_facts:
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Conditional
  debug:
    msg: "This instance is a t1.micro"
  when: ansible_ec2_instance_type == "t1.micro"

Inputs

    
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