Class: Ansible::Ruby::Modules::Ec2_instance
- Inherits:
-
Base
- Object
- Ansible::Ruby::Models::Base
- Base
- Ansible::Ruby::Modules::Ec2_instance
- Defined in:
- lib/ansible/ruby/modules/generated/cloud/amazon/ec2_instance.rb
Overview
Create and manage AWS EC2 instance
Instance Method Summary collapse
-
#availability_zone ⇒ Object?
Specify an availability zone to use the default subnet it.
-
#cpu_credit_specification ⇒ :unlimited, ...
For T2 series instances, choose whether to allow increased charges to buy CPU credits if the default pool is depleted.,Choose I(unlimited) to enable buying additional CPU credits.
-
#cpu_options ⇒ Object?
Reduce the number of vCPU exposed to the instance.,Those parameters can only be set at instance launch.
-
#detailed_monitoring ⇒ Object?
Whether to allow detailed cloudwatch metrics to be collected, enabling more detailed alerting.
-
#ebs_optimized ⇒ Object?
Whether instance is should use optimized EBS volumes, see U(docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSOptimized.html).
-
#filters ⇒ Array<String>, ...
A dict of filters to apply when deciding whether existing instances match and should be altered.
-
#image ⇒ Object?
An image to use for the instance.
-
#image_id ⇒ String?
I(ami) ID to use for the instance.
-
#instance_ids ⇒ Array<String>, ...
If you specify one or more instance IDs, only instances that have the specified IDs are returned.
-
#instance_initiated_shutdown_behavior ⇒ :stop, ...
Whether to stop or terminate an instance upon shutdown.
-
#instance_role ⇒ Object?
The ARN or name of an EC2-enabled instance role to be used.
-
#instance_type ⇒ String?
Instance type to use for the instance, see U(docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html) Only required when instance is not already present.
-
#key_name ⇒ String?
Name of the SSH access key to assign to the instance - must exist in the region the instance is created.
-
#launch_template ⇒ Object?
The EC2 launch template to base instance configuration on.,I(launch_template.id) the ID or the launch template (optional if name is specified),I(launch_template.name) the pretty name of the launch template (optional if id is specified),I(launch_template.version) the specific version of the launch template to use.
-
#name ⇒ String?
The Name tag for the instance.
-
#network ⇒ Hash?
Either a dictionary containing the key ‘interfaces’ corresponding to a list of network interface IDs or containing specifications for a single network interface.,If specifications for a single network are given, accepted keys are assign_public_ip (bool), private_ip_address (str), ipv6_addresses (list), source_dest_check (bool), description (str), delete_on_termination (bool), device_index (int), groups (list of security group IDs), private_ip_addresses (list), subnet_id (str).,I(network.interfaces) should be a list of ENI IDs (strings) or a list of objects containing the key I(id).,Use the ec2_eni to create ENIs with special settings.
-
#purge_tags ⇒ Boolean?
Delete any tags not specified in the task that are on the instance.
-
#security_group ⇒ String?
A security group ID or name.
-
#security_groups ⇒ Object?
A list of security group IDs or names (strings).
-
#state ⇒ :present, ...
Goal state for the instances.
-
#tags ⇒ Hash?
A hash/dictionary of tags to add to the new instance or to add/remove from an existing one.
-
#tenancy ⇒ :dedicated, ...
What type of tenancy to allow an instance to use.
-
#termination_protection ⇒ Object?
Whether to enable termination protection.
-
#tower_callback ⇒ Hash?
Preconfigured user-data to enable an instance to perform a Tower callback (Linux only).,Mutually exclusive with I(user_data).,For Windows instances, to enable remote access via Ansible set I(tower_callback.windows) to true, and optionally set an admin password.,If using ‘windows’ and ‘set_password’, callback to Tower will not be performed but the instance will be ready to receive winrm connections from Ansible.
-
#user_data ⇒ Object?
Opaque blob of data which is made available to the ec2 instance.
-
#volumes ⇒ Object?
A list of block device mappings, by default this will always use the AMI root device so the volumes option is primarily for adding more storage.,A mapping contains the (optional) keys device_name, virtual_name, ebs.volume_type, ebs.volume_size, ebs.kms_key_id, ebs.iops, and ebs.delete_on_termination.,For more information about each parameter, see U(docs.aws.amazon.com/AWSEC2/latest/APIReference/API_BlockDeviceMapping.html).
-
#vpc_subnet_id ⇒ String?
The subnet ID in which to launch the instance (VPC) If none is provided, ec2_instance will chose the default zone of the default VPC.
-
#wait ⇒ Boolean?
Whether or not to wait for the desired state (use wait_timeout to customize this).
-
#wait_timeout ⇒ Integer?
How long to wait (in seconds) for the instance to finish booting/terminating.
Methods inherited from Base
Methods inherited from Ansible::Ruby::Models::Base
attr_option, attr_options, attribute, fix_inclusion, #initialize, remove_existing_validations, #to_h, validates
Constructor Details
This class inherits a constructor from Ansible::Ruby::Models::Base
Instance Method Details
#availability_zone ⇒ Object?
83 |
# File 'lib/ansible/ruby/modules/generated/cloud/amazon/ec2_instance.rb', line 83 attribute :availability_zone |
#cpu_credit_specification ⇒ :unlimited, ...
97 |
# File 'lib/ansible/ruby/modules/generated/cloud/amazon/ec2_instance.rb', line 97 attribute :cpu_credit_specification |
#cpu_options ⇒ Object?
101 |
# File 'lib/ansible/ruby/modules/generated/cloud/amazon/ec2_instance.rb', line 101 attribute :cpu_options |
#detailed_monitoring ⇒ Object?
104 |
# File 'lib/ansible/ruby/modules/generated/cloud/amazon/ec2_instance.rb', line 104 attribute :detailed_monitoring |
#ebs_optimized ⇒ Object?
107 |
# File 'lib/ansible/ruby/modules/generated/cloud/amazon/ec2_instance.rb', line 107 attribute :ebs_optimized |
#filters ⇒ Array<String>, ...
110 |
# File 'lib/ansible/ruby/modules/generated/cloud/amazon/ec2_instance.rb', line 110 attribute :filters |
#image ⇒ Object?
47 |
# File 'lib/ansible/ruby/modules/generated/cloud/amazon/ec2_instance.rb', line 47 attribute :image |
#image_id ⇒ String?
50 |
# File 'lib/ansible/ruby/modules/generated/cloud/amazon/ec2_instance.rb', line 50 attribute :image_id |
#instance_ids ⇒ Array<String>, ...
12 |
# File 'lib/ansible/ruby/modules/generated/cloud/amazon/ec2_instance.rb', line 12 attribute :instance_ids |
#instance_initiated_shutdown_behavior ⇒ :stop, ...
86 |
# File 'lib/ansible/ruby/modules/generated/cloud/amazon/ec2_instance.rb', line 86 attribute :instance_initiated_shutdown_behavior |
#instance_role ⇒ Object?
114 |
# File 'lib/ansible/ruby/modules/generated/cloud/amazon/ec2_instance.rb', line 114 attribute :instance_role |
#instance_type ⇒ String?
28 |
# File 'lib/ansible/ruby/modules/generated/cloud/amazon/ec2_instance.rb', line 28 attribute :instance_type |
#key_name ⇒ String?
79 |
# File 'lib/ansible/ruby/modules/generated/cloud/amazon/ec2_instance.rb', line 79 attribute :key_name |
#launch_template ⇒ Object?
76 |
# File 'lib/ansible/ruby/modules/generated/cloud/amazon/ec2_instance.rb', line 76 attribute :launch_template |
#name ⇒ String?
61 |
# File 'lib/ansible/ruby/modules/generated/cloud/amazon/ec2_instance.rb', line 61 attribute :name |
#network ⇒ Hash?
69 |
# File 'lib/ansible/ruby/modules/generated/cloud/amazon/ec2_instance.rb', line 69 attribute :network |
#purge_tags ⇒ Boolean?
43 |
# File 'lib/ansible/ruby/modules/generated/cloud/amazon/ec2_instance.rb', line 43 attribute :purge_tags |
#security_group ⇒ String?
57 |
# File 'lib/ansible/ruby/modules/generated/cloud/amazon/ec2_instance.rb', line 57 attribute :security_group |
#security_groups ⇒ Object?
54 |
# File 'lib/ansible/ruby/modules/generated/cloud/amazon/ec2_instance.rb', line 54 attribute :security_groups |
#state ⇒ :present, ...
16 |
# File 'lib/ansible/ruby/modules/generated/cloud/amazon/ec2_instance.rb', line 16 attribute :state |
#tags ⇒ Hash?
39 |
# File 'lib/ansible/ruby/modules/generated/cloud/amazon/ec2_instance.rb', line 39 attribute :tags |
#tenancy ⇒ :dedicated, ...
90 |
# File 'lib/ansible/ruby/modules/generated/cloud/amazon/ec2_instance.rb', line 90 attribute :tenancy |
#termination_protection ⇒ Object?
94 |
# File 'lib/ansible/ruby/modules/generated/cloud/amazon/ec2_instance.rb', line 94 attribute :termination_protection |
#tower_callback ⇒ Hash?
35 |
# File 'lib/ansible/ruby/modules/generated/cloud/amazon/ec2_instance.rb', line 35 attribute :tower_callback |
#user_data ⇒ Object?
32 |
# File 'lib/ansible/ruby/modules/generated/cloud/amazon/ec2_instance.rb', line 32 attribute :user_data |
#volumes ⇒ Object?
73 |
# File 'lib/ansible/ruby/modules/generated/cloud/amazon/ec2_instance.rb', line 73 attribute :volumes |
#vpc_subnet_id ⇒ String?
65 |
# File 'lib/ansible/ruby/modules/generated/cloud/amazon/ec2_instance.rb', line 65 attribute :vpc_subnet_id |
#wait ⇒ Boolean?
20 |
# File 'lib/ansible/ruby/modules/generated/cloud/amazon/ec2_instance.rb', line 20 attribute :wait |
#wait_timeout ⇒ Integer?
24 |
# File 'lib/ansible/ruby/modules/generated/cloud/amazon/ec2_instance.rb', line 24 attribute :wait_timeout |