Class: Ansible::Ruby::Modules::Ec2
- Inherits:
-
Base
- Object
- Ansible::Ruby::Models::Base
- Base
- Ansible::Ruby::Modules::Ec2
- Defined in:
- lib/ansible/ruby/modules/generated/core/cloud/amazon/ec2.rb
Overview
Creates or terminates ec2 instances.
Instance Method Summary collapse
-
#assign_public_ip ⇒ :yes, ...
When provisioning within vpc, assign a public IP address.
-
#count ⇒ Integer?
Number of instances to launch.
-
#count_tag ⇒ Array<String>, ...
Used with ‘exact_count’ to determine how many nodes based on a specific tag criteria should be running.
-
#ebs_optimized ⇒ String?
Whether instance is using optimized EBS volumes, see U(docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSOptimized.html).
-
#exact_count ⇒ Integer?
An integer value which indicates how many instances that match the ‘count_tag’ parameter should be running.
-
#group ⇒ Array<String>, ...
Security group (or list of groups) to use with the instance.
-
#group_id ⇒ String?
Security group id (or list of ids) to use with the instance.
-
#image ⇒ String
I(ami) ID to use for the instance.
-
#instance_ids ⇒ Array<String>, ...
List of instance ids, currently used for states: absent, running, stopped.
-
#instance_profile_name ⇒ Object?
Name of the IAM instance profile to use.
-
#instance_tags ⇒ Hash?
A hash/dictionary of tags to add to the new instance or for starting/stopping instance by tag; ‘“key”:“value”’ and ‘“key”:“value”,“key”:“value”’.
-
#instance_type ⇒ String
Instance type to use for the instance, see U(docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html).
-
#kernel ⇒ Object?
Kernel I(eki) to use for the instance.
-
#key_name ⇒ String?
Key pair to use on the instance.
-
#monitoring ⇒ :yes, ...
Enable detailed monitoring (CloudWatch) for instance.
-
#network_interfaces ⇒ Array<String>, ...
A list of existing network interfaces to attach to the instance at launch.
-
#placement_group ⇒ Object?
Placement group for the instance when using EC2 Clustered Compute.
-
#private_ip ⇒ Object?
The private ip address to assign the instance (from the vpc subnet).
-
#ramdisk ⇒ Object?
Ramdisk I(eri) to use for the instance.
-
#region ⇒ String?
The AWS region to use.
-
#source_dest_check ⇒ Boolean?
Enable or Disable the Source/Destination checks (for NAT instances and Virtual Routers).
-
#spot_launch_group ⇒ String?
Launch group for spot request, see U(docs.aws.amazon.com/AWSEC2/latest/UserGuide/how-spot-instances-work.html#spot-launch-group).
-
#spot_price ⇒ Float?
Maximum spot price to bid, If not set a regular on-demand instance is requested.
-
#spot_type ⇒ :"one-time", ...
Type of spot request; one of “one-time” or “persistent”.
-
#spot_wait_timeout ⇒ Integer?
How long to wait for the spot instance request to be fulfilled.
-
#state ⇒ :present, ...
Create or terminate instances.
-
#tenancy ⇒ :default, ...
An instance with a tenancy of “dedicated” runs on single-tenant hardware and can only be launched into a VPC.
-
#termination_protection ⇒ Boolean?
Enable or Disable the Termination Protection.
-
#user_data ⇒ Object?
Opaque blob of data which is made available to the ec2 instance.
-
#volumes ⇒ Array<Hash>, ...
A list of hash/dictionaries of volumes to add to the new instance; ‘[“key”:“value”]’; keys allowed are - device_name (str; required), delete_on_termination (bool; False), device_type (deprecated), ephemeral (str), encrypted (bool; False), snapshot (str), volume_type (str), iops (int) - device_type is deprecated use volume_type, iops must be set when volume_type=‘io1’, ephemeral and snapshot are mutually exclusive.
-
#vpc_subnet_id ⇒ String?
The subnet ID in which to launch the instance (VPC).
-
#wait ⇒ :yes, ...
Wait for the instance to be ‘running’ before returning.
-
#wait_timeout ⇒ Integer?
How long before wait gives up, in seconds.
-
#zone ⇒ Object?
AWS availability zone in which to launch the instance.
Methods inherited from Base
Methods inherited from Ansible::Ruby::Models::Base
attr_option, attr_options, attribute, #initialize, remove_existing_validations, #to_h, validates
Constructor Details
This class inherits a constructor from Ansible::Ruby::Models::Base
Instance Method Details
#assign_public_ip ⇒ :yes, ...
Returns when provisioning within vpc, assign a public IP address. Boto library must be 2.13.0+.
90 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/amazon/ec2.rb', line 90 attribute :assign_public_ip |
#count ⇒ Integer?
Returns number of instances to launch.
68 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/amazon/ec2.rb', line 68 attribute :count |
#count_tag ⇒ Array<String>, ...
Returns Used with ‘exact_count’ to determine how many nodes based on a specific tag criteria should be running. This can be expressed in multiple ways and is shown in the EXAMPLES section. For instance, one can request 25 servers that are tagged with “class=webserver”. The specified tag must already exist or be passed in as the ‘instance_tags’ option.
128 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/amazon/ec2.rb', line 128 attribute :count_tag |
#ebs_optimized ⇒ String?
Returns whether instance is using optimized EBS volumes, see U(docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSOptimized.html).
120 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/amazon/ec2.rb', line 120 attribute :ebs_optimized |
#exact_count ⇒ Integer?
Returns An integer value which indicates how many instances that match the ‘count_tag’ parameter should be running. Instances are either created or terminated based on this value.
124 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/amazon/ec2.rb', line 124 attribute :exact_count |
#group ⇒ Array<String>, ...
Returns security group (or list of groups) to use with the instance.
15 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/amazon/ec2.rb', line 15 attribute :group |
#group_id ⇒ String?
Returns security group id (or list of ids) to use with the instance.
19 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/amazon/ec2.rb', line 19 attribute :group_id |
#image ⇒ String
Returns I(ami) ID to use for the instance.
46 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/amazon/ec2.rb', line 46 attribute :image |
#instance_ids ⇒ Array<String>, ...
Returns list of instance ids, currently used for states: absent, running, stopped.
100 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/amazon/ec2.rb', line 100 attribute :instance_ids |
#instance_profile_name ⇒ Object?
Returns Name of the IAM instance profile to use. Boto library must be 2.5.0+.
97 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/amazon/ec2.rb', line 97 attribute :instance_profile_name |
#instance_tags ⇒ Hash?
Returns a hash/dictionary of tags to add to the new instance or for starting/stopping instance by tag; ‘“key”:“value”’ and ‘“key”:“value”,“key”:“value”’.
79 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/amazon/ec2.rb', line 79 attribute :instance_tags |
#instance_type ⇒ String
Returns instance type to use for the instance, see U(docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html).
30 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/amazon/ec2.rb', line 30 attribute :instance_type |
#kernel ⇒ Object?
Returns kernel I(eki) to use for the instance.
50 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/amazon/ec2.rb', line 50 attribute :kernel |
#key_name ⇒ String?
Returns key pair to use on the instance.
11 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/amazon/ec2.rb', line 11 attribute :key_name |
#monitoring ⇒ :yes, ...
Returns enable detailed monitoring (CloudWatch) for instance.
72 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/amazon/ec2.rb', line 72 attribute :monitoring |
#network_interfaces ⇒ Array<String>, ...
Returns A list of existing network interfaces to attach to the instance at launch. When specifying existing network interfaces, none of the assign_public_ip, private_ip, vpc_subnet_id, group, or group_id parameters may be used. (Those parameters are for creating a new network interface at launch.).
132 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/amazon/ec2.rb', line 132 attribute :network_interfaces |
#placement_group ⇒ Object?
Returns placement group for the instance when using EC2 Clustered Compute.
83 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/amazon/ec2.rb', line 83 attribute :placement_group |
#private_ip ⇒ Object?
Returns the private ip address to assign the instance (from the vpc subnet).
94 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/amazon/ec2.rb', line 94 attribute :private_ip |
#ramdisk ⇒ Object?
Returns ramdisk I(eri) to use for the instance.
53 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/amazon/ec2.rb', line 53 attribute :ramdisk |
#region ⇒ String?
Returns The AWS region to use. Must be specified if ec2_url is not used. If not specified then the value of the EC2_REGION environment variable, if any, is used. See U(docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region).
23 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/amazon/ec2.rb', line 23 attribute :region |
#source_dest_check ⇒ Boolean?
Returns Enable or Disable the Source/Destination checks (for NAT instances and Virtual Routers).
104 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/amazon/ec2.rb', line 104 attribute :source_dest_check |
#spot_launch_group ⇒ String?
Returns Launch group for spot request, see U(docs.aws.amazon.com/AWSEC2/latest/UserGuide/how-spot-instances-work.html#spot-launch-group).
136 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/amazon/ec2.rb', line 136 attribute :spot_launch_group |
#spot_price ⇒ Float?
Returns Maximum spot price to bid, If not set a regular on-demand instance is requested. A spot request is made with this maximum bid. When it is filled, the instance is started.
38 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/amazon/ec2.rb', line 38 attribute :spot_price |
#spot_type ⇒ :"one-time", ...
Returns Type of spot request; one of “one-time” or “persistent”. Defaults to “one-time” if not supplied.
42 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/amazon/ec2.rb', line 42 attribute :spot_type |
#spot_wait_timeout ⇒ Integer?
Returns how long to wait for the spot instance request to be fulfilled.
64 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/amazon/ec2.rb', line 64 attribute :spot_wait_timeout |
#state ⇒ :present, ...
Returns create or terminate instances.
112 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/amazon/ec2.rb', line 112 attribute :state |
#tenancy ⇒ :default, ...
Returns An instance with a tenancy of “dedicated” runs on single-tenant hardware and can only be launched into a VPC. Note that to use dedicated tenancy you MUST specify a vpc_subnet_id as well. Dedicated tenancy is not available for EC2 “micro” instances.
34 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/amazon/ec2.rb', line 34 attribute :tenancy |
#termination_protection ⇒ Boolean?
Returns Enable or Disable the Termination Protection.
108 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/amazon/ec2.rb', line 108 attribute :termination_protection |
#user_data ⇒ Object?
Returns opaque blob of data which is made available to the ec2 instance.
76 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/amazon/ec2.rb', line 76 attribute :user_data |
#volumes ⇒ Array<Hash>, ...
Returns a list of hash/dictionaries of volumes to add to the new instance; ‘[“key”:“value”]’; keys allowed are - device_name (str; required), delete_on_termination (bool; False), device_type (deprecated), ephemeral (str), encrypted (bool; False), snapshot (str), volume_type (str), iops (int) - device_type is deprecated use volume_type, iops must be set when volume_type=‘io1’, ephemeral and snapshot are mutually exclusive.
116 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/amazon/ec2.rb', line 116 attribute :volumes |
#vpc_subnet_id ⇒ String?
Returns the subnet ID in which to launch the instance (VPC).
86 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/amazon/ec2.rb', line 86 attribute :vpc_subnet_id |
#wait ⇒ :yes, ...
Returns wait for the instance to be ‘running’ before returning. Does not wait for SSH, see ‘wait_for’ example for details.
56 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/amazon/ec2.rb', line 56 attribute :wait |
#wait_timeout ⇒ Integer?
Returns how long before wait gives up, in seconds.
60 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/amazon/ec2.rb', line 60 attribute :wait_timeout |
#zone ⇒ Object?
Returns AWS availability zone in which to launch the instance.
27 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/amazon/ec2.rb', line 27 attribute :zone |