mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-28 07:31:23 -07:00
Added instance_tenancy functionality per social request.
This commit is contained in:
parent
ccb64e6358
commit
73fa767a6b
1 changed files with 9 additions and 1 deletions
|
@ -26,6 +26,12 @@ options:
|
||||||
description:
|
description:
|
||||||
- "The cidr block representing the VPC, e.g. 10.0.0.0/16"
|
- "The cidr block representing the VPC, e.g. 10.0.0.0/16"
|
||||||
required: false, unless state=present
|
required: false, unless state=present
|
||||||
|
instance_tenancy:
|
||||||
|
description:
|
||||||
|
- "The supported tenancy options for instances launched into the VPC."
|
||||||
|
required: false
|
||||||
|
default: "default"
|
||||||
|
choices: [ "default", "dedicated" ]
|
||||||
dns_support:
|
dns_support:
|
||||||
description:
|
description:
|
||||||
- toggles the "Enable DNS resolution" flag
|
- toggles the "Enable DNS resolution" flag
|
||||||
|
@ -201,6 +207,7 @@ def create_vpc(module, vpc_conn):
|
||||||
|
|
||||||
id = module.params.get('id')
|
id = module.params.get('id')
|
||||||
cidr_block = module.params.get('cidr_block')
|
cidr_block = module.params.get('cidr_block')
|
||||||
|
instance_tenancy = module.params.get('instance_tenancy')
|
||||||
dns_support = module.params.get('dns_support')
|
dns_support = module.params.get('dns_support')
|
||||||
dns_hostnames = module.params.get('dns_hostnames')
|
dns_hostnames = module.params.get('dns_hostnames')
|
||||||
subnets = module.params.get('subnets')
|
subnets = module.params.get('subnets')
|
||||||
|
@ -227,7 +234,7 @@ def create_vpc(module, vpc_conn):
|
||||||
else:
|
else:
|
||||||
changed = True
|
changed = True
|
||||||
try:
|
try:
|
||||||
vpc = vpc_conn.create_vpc(cidr_block)
|
vpc = vpc_conn.create_vpc(cidr_block, instance_tenancy)
|
||||||
# wait here until the vpc is available
|
# wait here until the vpc is available
|
||||||
pending = True
|
pending = True
|
||||||
wait_timeout = time.time() + wait_timeout
|
wait_timeout = time.time() + wait_timeout
|
||||||
|
@ -483,6 +490,7 @@ def main():
|
||||||
argument_spec = ec2_argument_spec()
|
argument_spec = ec2_argument_spec()
|
||||||
argument_spec.update(dict(
|
argument_spec.update(dict(
|
||||||
cidr_block = dict(),
|
cidr_block = dict(),
|
||||||
|
instance_tenancy = dict(choices=['default', 'dedicated'], default='default'),
|
||||||
wait = dict(choices=BOOLEANS, default=False),
|
wait = dict(choices=BOOLEANS, default=False),
|
||||||
wait_timeout = dict(default=300),
|
wait_timeout = dict(default=300),
|
||||||
dns_support = dict(choices=BOOLEANS, default=True),
|
dns_support = dict(choices=BOOLEANS, default=True),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue