aws_account_attribute – Look up AWS account attributes¶
New in version 2.5.
Synopsis¶
Describes attributes of your AWS account. You can specify one of the listed attribute choices or omit it to see all attributes.
Requirements¶
The below requirements are needed on the local master node that executes this lookup.
boto3
botocore
Parameters¶
Examples¶
vars:
has_ec2_classic: "{{ lookup('aws_account_attribute', attribute='has-ec2-classic') }}"
# true | false
default_vpc_id: "{{ lookup('aws_account_attribute', attribute='default-vpc') }}"
# vpc-xxxxxxxx | none
account_details: "{{ lookup('aws_account_attribute', wantlist='true') }}"
# {'default-vpc': ['vpc-xxxxxxxx'], 'max-elastic-ips': ['5'], 'max-instances': ['20'],
# 'supported-platforms': ['VPC', 'EC2'], 'vpc-max-elastic-ips': ['5'], 'vpc-max-security-groups-per-interface': ['5']}
Return Values¶
Common return values are documented here, the following are the fields unique to this lookup:
Key | Returned | Description |
---|---|---|
_raw
-
|
Returns a boolean when attribute is check_ec2_classic. Otherwise returns the value(s) of the attribute (or all attributes if one is not specified).
|
Status¶
This lookup is not guaranteed to have a backwards compatible interface. [preview]
This lookup is maintained by the Ansible Community. [community]