@ -277,8 +277,8 @@ def get_current_resource(conn, resource, command):
def main():
def main():
module = AnsibleModule(
argument_spec = ec2_argument_spec()
argument_spec = dict(
argument_spec.update( dict(
command = dict(choices=['create', 'replicate', 'delete', 'facts', 'modify', 'promote', 'snapshot', 'restore'], required=True),
command = dict(choices=['create', 'replicate', 'delete', 'facts', 'modify', 'promote', 'snapshot', 'restore'], required=True),
instance_name = dict(required=True),
instance_name = dict(required=True),
source_instance = dict(required=False),
source_instance = dict(required=False),
@ -300,11 +300,8 @@ def main():
maint_window = dict(required=False),
maint_window = dict(required=False),
backup_window = dict(required=False),
backup_window = dict(required=False),
backup_retention = dict(required=False),
backup_retention = dict(required=False),
region = dict(aliases=['aws_region', 'ec2_region'], choices=AWS_REGIONS, required=False),
zone = dict(aliases=['aws_zone', 'ec2_zone'], required=False),
zone = dict(aliases=['aws_zone', 'ec2_zone'], required=False),
subnet = dict(required=False),
subnet = dict(required=False),
aws_secret_key = dict(aliases=['ec2_secret_key', 'secret_key'], no_log=True, required=False),
aws_access_key = dict(aliases=['ec2_access_key', 'access_key'], required=False),
wait = dict(type='bool', default=False),
wait = dict(type='bool', default=False),
wait_timeout = dict(default=300),
wait_timeout = dict(default=300),
snapshot = dict(required=False),
snapshot = dict(required=False),
@ -313,6 +310,10 @@ def main():
)
)
)
)
module = AnsibleModule(
argument_spec=argument_spec,
)
command = module.params.get('command')
command = module.params.get('command')
instance_name = module.params.get('instance_name')
instance_name = module.params.get('instance_name')
source_instance = module.params.get('source_instance')
source_instance = module.params.get('source_instance')